SDA SE WikiSoftware Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents the package declaration.
#id: id
the unique ID assigned to this fact.
'fullname': atom
package name of this package declaration, as an atom.
E. g.:
packageT(42, 'org.cs3.pl.astvisitor').
packageT(defaultPackage, ' '). (for the default Java package) ← Changed in JT 2.6.3 Previously the PEF for the default package was packageT(null,' ')
Note: packageT does not have the ID of the children in his declaration. packageT has so called unreferenced_children, that means the children referencing the parent, but not the other way around.
The unreferenced_children from packageT are compilationUnitT, see also Program Element Facts for Java AST
package packaged.de.tests;
public class tests {
...
}
packageT(#Package, 'packaged.de.tests'), compilationUnitT(#CompilationUnit, #Package, ..., [], #Class), classT(#Class, #CompilationUnit, 'tests', [#Children]),
ast_node_def('Java',packageT,[
ast_arg(id, mult(1,1,no ), id, [id]), % <-- convention!!!
ast_arg(name, mult(1,1,no ), attr, [atom])
]).