The JTransformer release 2.6.0 incorporates the following changes of the PEF representation:
JT 2.6 separates the language independent PEFs for projects, folders and files from the PEFs representing language specific file contents. Now there are two containment hierarchies:
They are linked by the reference from compilationUnitT to fileS. As a mnemonic aid, the suffix S of projectS, sourcefolderS and fileS stands for “Source”. It indicates that these elements representat language independent Source information, not abstract syntax tree elements (which have the suffix T – for Tree).
Note that that not only the PEF name changed, but also the structure. Each project now has its own identity.
projectLocationT(#file, 'ProjectName', 'SourceFolder')(#file, 'ProjectName', 'SourceFolder')
sourceFolderS(#id, #ProjectID, 'SourceFolder')(#id, #ProjectID, 'SourceFolder')
Note that that not only the name changed, but also the structure. Each folder has its own identity and refers to its containing project via an identity. It does not refer to contained files anymore. The files refer to the containing folder via its identity (see below).
Previously, fileT mixed language independent information (e.g. the file name) with language specific information (e.g. packages). It has therefore been split into an element that only represents language specific information (fileS) and an element that represents Java-specific information and links it to the file (compilationUnitT). See the documentation of compilationUnitT for hints how to migrate old code.
In JTransformer versions < 2.6.0
Since JTransformer 2.6.0
newClassT (#id, #parent, #encl, #constructor, [#arg_1,…], #typeExpr, #def, #enclosing)
newClassT(#id, #parent, #encl, #constructor, [#arg_1,…], #instantiatedClass, #def, #enclosing)
identT(#id, #parent, #encl, 'name', #symbol)
only represents identifiers. In JTransformer versions < 2.6.0 it also represented class literals and qualified type names. Now
selectT(#id, #parent, #encl, 'name', ENCLOSING_TYPE, #selectedType)
now only represents class literals (TypeName.class) or the access to super and this “instances” in inner and anonymous classes. Previously, it was also used for representating the nesting of qualified type names in constructor calls.
typeRefT(#id, #parent, #encl, #type)
A new AST element. Represents a (qualified) class name in static method calls or static field access.
The new PEF for comments represents arbitrary comments. For Java source files javadoc, block and end-of-line comments are represented. This PEF supports loss-free reverse engineering after transformations.