Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents a Java compilation unit, that is a file that contains a set of import and type declarations that are compiled together and belong to the same package. The import and type declarations are children of the compilation unit. The package is the parent of the compilation unit. The file is a reference to an element that is not part of the Java AST. This is specified by: fileS ← Changed in JT 2.6 Formerly fileT – See notes on Changes JTranformer 2.5 -> 2.6
#id: id
the unique ID assigned to this fact.
#package: packageT, 'defaultPackage'
Id of the containing package or 'defaultPackage'.
#file: fileS, 'dummyFile'
Id of the file that contains this compilation unit or 'dummyFile' for Bytecode classes.
[#import_1,…]: importT
List of IDs of import declarations contained in the compilation unit. The order in the list corresponds to the textual order in the file.
[#def_1,…]: classT
List of IDs of type declarations contained in the compilation unit. The order in the list corresponds to the textual order in the file.
package packaged; import java.util.List; public class DummyClass { List list; }
packageT(#Package, 'packaged'), compilationUnitT(#CompilationUnit, #Package, #File, [#Import], [#Class]), importT(#Import, #CompilationUnit, #Imported), classT(#Class, #CompilationUnit, 'DummyClass', [#Field]), fieldT(...
ast_node_type_spec(compilationUnitT,[ ast_arg(id, mult(1,1,no ), id, [compilationUnitT]), ast_arg(parent, mult(0,1,no), id, [packageT]), ast_arg(file, mult(1,1,no ), id, [fileS]), ast_arg(imports,mult(0,*,ord), id, [importT]), ast_arg(defs, mult(0,*,ord), id, [classT]) ]).