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

Next revision
Previous revision
research:jtransformer:api:java:pefs:4.2:classt [2015/06/29 13:28]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:4.2:classt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
 +
 +=== classT(#id, #parent, '​name',​ #paramRef, [#​def_1,​...]) ​ ===
 +
 +Represents the class or interface declaration. Every interface declaration is accompanied by the additional fact: [[interfacet|interfaceT]](#​id).\\ ​
 +Every annotation declaration is accompanied by an [[interfacet|interfaceT]](#​id) and an [[annotationt|annotationT]](#​id) fact.\\
 +If it is an abstract class, there will be an additional [[modifiert|modifierT]](Class,​ '​abstract'​) fact.
 +
 +Renamed in JT 2.8: Up to 2.8.0 it was defined as [[..:​old:​classdeft|classDefT]].\\
 +Changed in JT 2.6: Now '​owner'​ referst to a [[compilationunitt|compilationUnitT]] instead of a [[packaget|packageT]]. See notes on [[..:​..:​migration:​upgradeinstructions]].
 +
 +=== Arguments ===
 +== ==
 +**#id:** id \\ 
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** [[exect|execT]],​ [[compilationunitt|compilationUnitT]],​ [[classt|classT]],​ [[newclasst|newClassT]] \\
 +ID of the element that contains this class declaration. ​
 +
 +**'​name':​** atom \\ 
 +the class name, **without** a package. In the case of anonymous classes, a globally unique name: ANONYMOUS$<​UN>,​ where <UN> is a unique number.
 +
 +**#​paramRef:​** [[typeparamt|typeParamT]] \\
 +List of the type parameters of the class.
 +
 +**[#​def_1,​...]:​** [[annotationmembert|annotationMemberT]],​ [[classt|classT]],​ [[fieldt|fieldT]],​ [[methodt|methodT]],​ [[constructort|constructorT]],​ [[classinitializert|classInitializerT]] \\ 
 +list of IDs for other facts representing the methods or fields, and inner classes. These fields and methods are the members (not necessarily public!) of the class.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +class HelloWorld ​ { //​corresponding code line to classT
 +
 +   ...
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +== ==
 +<Code lang-prolog>​
 +classT(#id, #​parentElement,​ '​HelloWorld',​ [], [#members ...]).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​classT,​[
 +     ​ast_arg(id, ​     mult(1,1,no ), id,  [classT]),
 +     ​ast_arg(parent, ​ mult(1,1,no ), id,  [execT, compilationUnitT,​ classT, newT, blockT]), ​
 +     ​ast_arg(name, ​   mult(1,1,no ), attr,​[atomic]),​
 +     ​ast_arg(paramRef,​mult(0,​*,​ord ),id,  [typeParamT]),​
 +     ​ast_arg(defs, ​   mult(0,​*,​ord),​ id,  [annotationMemberT,​ classT, fieldT, methodT, constructorT,​ classInitializerT])
 +]).
 +</​Code>​
  
research/jtransformer/api/java/pefs/4.2/classt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019