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:typereft [2014/01/23 13:45]
Günter Kniesel
research:jtransformer:api:java:pefs:3.0:typereft [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +=== typeRefT(#​id,​ #parent, #encl, #​referencedType) ​ ===
 +
 +A typeRefT refers to a class, a basic type or a type parameter. (++History|Formerly part of identT. Introduced in JTransformer 2.6.0_20080829. Changed in JTransformer 3.0. Removed in Jtransformer 4.0 ++)
 +
 +
 +=== Arguments ===
 +
 +==  ==
 +**#id:** id\\  ​
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** id\\ 
 +the ID of the fact that represents the parent of this fact in the prolog AST.
 +
 +**#encl:** [[methodt|methodT]],​ [[constructorT|constructorT]],​ [[classInitializerT|classInitializerT]],​ [[fieldt|fieldT]],​ [[classt|classT]],​ [[annotationmembert|annotationMemberT]],​ [[annotationt|annotationT]]\\ ​
 +the ID of the fact that represents the enclosing element.
 +
 +**#​referencedType:​** [[classt|classT]],​ [[basictypet|basicTypeT]],​ [[typeparamt|typeParamT]] \\
 +the ID of the referenced type.
 +
 +
 +=== Sample Java Source ===
 +
 +==  ==
 +<Code lang-java>​
 +String m() {                                                             
 +    ...
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +
 +==  ==
 +<​Code>​
 +methodT(#​meth,​ ..., '​m',​ [], #typeref, [], ...).   
 +typeRefT(#​typeref,​ #meth, #meth, #string).
 +classT(#​string,​ ..., '​String',​ ...).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​typeRefT,​[
 +     ​ast_arg(id, ​     mult(1,1,no ), id, [typeRefT]),​
 +     ​ast_arg(parent, ​ mult(1,1,no ), id, [id]), ​
 +     ​ast_arg(encl, ​   mult(1,1,no ), id, [methodT, constructorT,​ classInitializerT,​fieldT,​classT,​annotationMemberT,​annotationT]), ​
 +     ​ast_arg(typeRef,​ mult(1,1,no ), id, [classT,​basicTypeT,​typeParamT])
 +]).
 +
 +</​Code>​
research/jtransformer/api/java/pefs/3.0/typereft.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019