SDA SE WikiSoftware Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
parameterizedTypeT is used to represent references to generic types with the bounds of type parameters and extendsT 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.
HashMap<String, Object> m() {
...
}
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_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])
]).