SDA SE Wiki

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

User Tools

Site Tools


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, parameterizedTypeT, arrayTypeT
the ID of the reference to the super/sub type.

Sample Java Source

List<? extends Exception> m1() {                                                             
    ...
}
List<?> m2() {                                                             
    ...
}

Its PEF Representation

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

AST Specification

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

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

SEWiki, © 2025