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

research:jtransformer:api:java:pefs:3.0:wildcardt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +=== wildCardT(#​id,​ #parent, '​kind',​ bounds) ​ ===
 +
 +represents wildcards. ​
 +
 +=== 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.
 +
 +**'​kind':​** atom\\ ​
 +extends or super.
 +
 +**#​bounds:​** [[typeRefT|typeRefT]],​ [[parameterizedTypeT|parameterizedTypeT]],​ [[arrayTypeT|arrayTypeT]]\\
 +the ID of the reference to the super/sub type.
 +
 +
 +=== Sample Java Source ===
 +
 +==  ==
 +<Code lang-java>​
 +List<? extends Exception>​ m1() {                                                             
 +    ...
 +}
 +List<?>​ m2() {                                                             
 +    ...
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +
 +==  ==
 +<​Code>​
 +methodT(#​meth1,​ ..., '​m1',​ [], #​parameterizedtype1,​ [], ...).
 +parameterizedTypeT(#​parameterizedtype1,​ #meth1, #list, [#​wildcard1]).
 +wildCardT(#​wildcard1,​ #​parameterizedtype1,​ extends, #typeref1).
 +typeRefT(#​typeref1,​ #wildcard1, #meth, #​exception).
 +
 +classT(#​list,​ ..., '​List',​ ...).
 +classT(#​exception,​ ..., '​Exception',​ ...).
 +classT(#​object,​ ..., '​Object',​ ...).
 +
 +methodT(#​meth2,​ ..., '​m2',​ [], #​parameterizedtype2,​ [], ...).
 +parameterizedTypeT(#​parameterizedtype2,​ #meth2, #list, [#​wildcard2]).
 +wildCardT(#​wildcard2,​ #​parameterizedtype2,​ extends, #typeref2).
 +typeRefT(#​typeref2,​ #wildcard2, #meth, #object).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​ wildCardT,[
 +    ast_arg(id, ​    ​mult(1,​1,​no ​ ), id,   ​[wildCardT]),​
 +    ast_arg(parent,​ mult(1,​1,​no ​ ), id,   ​[parameterizedTypeT]),​
 +    ast_arg(kind, ​  ​mult(1,​1,​no ​ ), attr, [atom]),
 +    ast_arg(bounds,​ mult(1,​1,​no ​ ), id,   ​[typeRefT,​ parameterizedTypeT,​ arrayTypeT])
 +]).
 +
 +</​Code>​
research/jtransformer/api/java/pefs/3.0/wildcardt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019