The PEF types ending in a capital S (sourceFolderS, projectS, fileS) represent the language-independent organisation of Source code in projects, directories and files. All other PEF types represent language-specific elements of the Java AST. Their name ends in T, which is a mnemonic for Tree.
See the Migration guide for a more detailed discussion of language-independent versus language-dependent elements.
Among the PEF's that represent parts of the AST, we distinguish Program Elements from Attributes:
Program elements represent nodes in the AST. They always have their own identity in their first argument and the identity of their parent element in the second argument.
Elements of method bodies (statements and expressions) additionally have the reference to the containing method or field (in case of initialisation blocks) as a third argument1).
There are no general rules about the structure / contents of other arguments.
Attributes represent information about program elements that is factored out, either because
- it is optional (which is mostly the case) or because
- it is multi-valued but unordered (such as the different modifiers of a program element). In the latter case, each value is represented by a separate PEF. Note that multiple, ordered values are represented by list arguments of program elements.
- Flags are attributes that have the identity of the related program element as their only argument. For instance, the flag
interfaceT(#class)indicates that a class is actually an interface.
- Proper attributes are attributes that connect the identity of some program element to some primitive values (but not to identities of other program elements). For instance,
modifierT(#element, 'modifier')is a proper attribute.
- Relations are attributes that connect the identities of different program elements (they may additionally contain primitive values). For instance,
extendsT(#class,#class)is a relation that indicates that one class type extends the other.