SDA SE Wiki

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

User Tools

Site Tools


Command disabled: revisions

wildcardT(#id, 'kind', bounds)

represents a wildcard in a generic type.

Arguments

#id: id
the unique ID assigned to this fact.

'kind': atom
extends or super.

#bounds: classT, parameterizedTypeT, arrayTypeT, typeParamT, wildcardT
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, #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).

AST Specification

ast_node_type_spec(wildcardT,[
     ast_arg(id,     mult(1,1,no  ), id,   [wildcardT]),
     ast_arg(kind,   mult(1,1,no  ), attr, [atomic]),
     ast_arg(bounds, mult(1,1,no  ), id,   [classT, parameterizedTypeT, arrayTypeT, typeParamT, wildcardT])
]).

research/jtransformer/api/java/pefs/4.2/wildcardt.txt · Last modified: 2019/01/29 15:13 by Günter Kniesel

SEWiki, © 2019