SE & SDA Wiki

Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering

User Tools

Site Tools


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, typeParamT, methodT, literalT, fieldT, localT, newArrayT, selectT, typeTestT, annotationMemberT, typeCastT, paramT, parameterizedTypeT, arrayTypeT, newClassT, callT, wildCardT
the ID of the fact that represents the parent of this fact in the prolog AST.

#rawType: classT
the ID of the raw type.

[#typeParam_1, …]: typeRefT, parameterizedTypeT, wildCardT, arrayTypeT
list of IDs of the type parameters.

Sample Java Source

HashMap<String, Object> m() {                                                             
    ...
}

Its PEF Representation

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', ...).

AST Specification

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]) 
]).

research/jtransformer/api/java/pefs/3.0/parameterizedtypet.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2018