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:3.0:classinitializert [2013/07/05 09:09]
127.0.0.1 external edit
research:jtransformer:api:java:pefs:3.0:classinitializert [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
 +----
  
 +=== classInitializerT(#​id,​ #​class,#​body) ​ ===
 +
 +Represents the initializer declaration.
 +
 +Added in JT 2.8: Up to 2.8.0 it was part of [[..:​old:​methoddeft|methodDefT]].
 +
 +=== Arguments ===
 +== ==
 +**#id:** id\\ 
 +the unique ID assigned to this fact.
 +
 +**#class:** [[classt|classT]]\\ ​
 +ID of the parent/​declaring class.
 +
 +**#body:** [[blockt|blockT]]\\ ​
 +ID of the block.
 +
 +=== Sample Java Source ===
 +== ==
 +<Code lang-java>​
 +class MyClass ​ {   
 +       ​static { ... }
 +...                                              ​
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +==  ==
 +<Code lang-prolog>​
 +class(#​class,​ #​compilationUnit,​ '​MyClass',​ [..., #init]).
 +classInitializerT(#​init,​ #class, #body).
 +modifierT(#​init,​ static).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​classInitializerT,​[
 +    ast_arg(id, ​     mult(1,1,no ), id,  [classInitializerT]),​
 +    ast_arg(parent, ​ mult(1,1,no ), id,  [classT]), ​
 +    ast_arg(body, ​   mult(0,​1,​no), ​ id,  [blockT])
 +]).
 +</​Code>​
research/jtransformer/api/java/pefs/3.0/classinitializert.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019