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:wildcardt [2015/04/22 13:55]
fabian.noth
research:jtransformer:api:java:pefs:4.0:wildcardt [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +=== wildcardT(#​id,​ '​kind',​ bounds) ​ ===
 +
 +represents wildcards. ​
 +
 +=== Arguments ===
 +
 +==  ==
 +**#id:** id\\  ​
 +the unique ID assigned to this fact.
 +
 +**'​kind':​** atom\\ ​
 +extends or super.
 +
 +**#​bounds:​** [[classT|classT]],​ [[parameterizedTypeT|parameterizedTypeT]],​ [[arrayTypeT|arrayTypeT]],​ [[typeParamT|typeParamT]],​ [[wildcardT|wildcardT]]\\
 +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,​ #list, [#​wildcard1]).
 +wildCardT(#​wildcard1,​ extends, #​exception).
 +
 +classT(#​list,​ ..., '​List',​ ...).
 +classT(#​exception,​ ..., '​Exception',​ ...).
 +classT(#​object,​ ..., '​Object',​ ...).
 +
 +methodT(#​meth2,​ ..., '​m2',​ [], #​parameterizedtype2,​ [], ...).
 +parameterizedTypeT(#​parameterizedtype2,​ #list, [#​wildcard2]).
 +wildCardT(#​wildcard2,​ extends, #object).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​ wildCardT,[
 +    ast_arg(id, ​    ​mult(1,​1,​no ​ ), id,   ​[wildCardT]),​
 +    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/4.0/wildcardt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019