Differences

This shows you the differences between two versions of the page.

Link to this comparison view

research:jtransformer:api:java:pefs:3.0:parameterizedtypet [2018/05/09 01:59] (current)
Line 1: Line 1:
 +{{page>​prologast_bodypef_index&​fullpage&​nofooter}}
  
 +=== parameterizedTypeT(#​id,​ #parent, #rawType, [#​typeParam_1,​ ...])  ===
 +
 +parameterizedTypeT is used to represent references to generic types with the bounds of type parameters and extendsT arguments
 +
 +=== Arguments ===
 +
 +==  ==
 +**#id:** id\\  ​
 +the unique ID assigned to this fact.
 +
 +**#​parent:​** [[classT|classT]],​ [[typeParamT|typeParamT]],​ [[methodT|methodT]],​ [[literalT|literalT]],​ [[fieldT|fieldT]],​ [[localT|localT]],​ [[newArrayT|newArrayT]],​ [[selectT|selectT]],​ [[typeTestT|typeTestT]],​ [[annotationMemberT|annotationMemberT]],​ [[typeCastT|typeCastT]],​ [[paramT|paramT]],​ [[parameterizedTypeT|parameterizedTypeT]],​ [[arrayTypeT|arrayTypeT]],​ [[newClassT|newClassT]],​ [[callT|callT]],​ [[wildCardT|wildCardT]]\\ ​
 +the ID of the fact that represents the parent of this fact in the prolog AST.
 +
 +**#​rawType:​** [[classT|classT]]\\ ​
 +the ID of the raw type.
 +
 +**[#​typeParam_1,​ ...]:** [[typeRefT|typeRefT]],​ [[parameterizedTypeT|parameterizedTypeT]],​ [[wildCardT|wildCardT]],​ [[arrayTypeT|arrayTypeT]]\\
 +list of IDs of the type parameters.
 +
 +
 +=== Sample Java Source ===
 +
 +==  ==
 +<Code lang-java>​
 +HashMap<​String,​ Object> m() {                                                             
 +    ...
 +}
 +</​Code>​
 +
 +
 +=== Its PEF Representation ===
 +
 +==  ==
 +<​Code>​
 +methodT(#​meth,​ ..., '​m',​ [], #​parameterizedtype,​ [], ...).
 +parameterizedTypeT(#​parameterizedtype,​ #meth, #rawtype, [#typeref1, #​typeref2]).
 +
 +classT(#​rawtype,​ ..., '​HashMap',​ ...).
 +
 +typeRefT(#​typeref1,​ #​parameterizedtype,​ #meth, #string).
 +classT(#​string,​ ..., '​String',​ ...).
 +
 +typeRefT(#​typeref2,​ #​parameterizedtype,​ #meth, #object).
 +classT(#​object,​ ..., '​Object',​ ...).
 +</​Code>​
 +
 +=== AST Specification ===
 +== ==
 +<​Code>​
 +ast_node_def('​Java',​ parameterizedTypeT,​[
 +    ast_arg(id, ​        ​mult(1,​1,​no ), id, [parameterizedTypeT]),​
 +    ast_arg(parent, ​    ​mult(1,​1,​no ), id, [classT, typeParamT, methodT, literalT, fieldT, localT, ​
 +                                            newArrayT, selectT, typeTestT, annotationMemberT, ​
 +                                            typeCastT, paramT, parameterizedTypeT,​ arrayTypeT, ​
 +                                            newClassT, callT, wildCardT]), ​
 +    ast_arg(rawType, ​   mult(1,1,no ), id, [classT]),
 +    ast_arg(typeParams,​ mult(0,​*,​ord),​ id, [typeRefT, parameterizedTypeT,​ wildCardT, arrayTypeT]) ​
 +]).
 +
 +</​Code>​
research/jtransformer/api/java/pefs/3.0/parameterizedtypet.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019