SDA SE Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
research:jtransformer:api:java:pefs:4.0:packaget [2015/01/14 05:16]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:4.0:packaget [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
  
 +=== packageT(#​id,​ '​fullname'​) ​ ===
 +
 +Represents the package declaration.
 +
 +=== Arguments ===
 +== ==
 +**#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|compilationUnitT]],​ see also [[..:​..:​prologast#​basic_structure|Program Element Facts for Java AST]]
 +
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 + ​package packaged.de.tests;​
 + ​public class tests {
 +   ...
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +== ==
 +<Code lang-prolog>​
 +packageT(#​Package,​ '​packaged.de.tests'​), ​
 +compilationUnitT(#​CompilationUnit,​ #Package, ..., [], #​Class), ​                              
 +classT(#​Class,​ #​CompilationUnit,​ '​tests',​ [#​Children]),​
 +
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​packageT,​[
 +     ​ast_arg(id, ​  ​mult(1,​1,​no ), id,   ​[packageT]),​
 +     ​ast_arg(name,​ mult(1,1,no ), attr, [atom])
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/4.0/packaget.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019