SDA SE Wiki

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

User Tools

Site Tools



preserve_noTypeArgumentsT(#id)

This fact is used for preserving the original appearance of the source code after transformations. It declares, that the (implicit) type arguments in a method or constructor call should be omitted.

<U extends A> void m() {...}
...
this.m();

instead of

<U extends A> void m() {...}
...
this.<A>m();
History
  • JTransformer 3.0: Added as noTypeArgumentsT
  • JTransformer 4.0: Renamed to preserve_noTypeArgumentsT

Arguments

id: callT, newT
ID of the corresponding method or constructor invocation

Sample Java Source

<U extends A> void m() {...}
...
this.<A>m();

Its PEF Representation

methodT(Method, _, m, [], _, [], [TypeParam], _),
typeParamT(TypeParam, Method, 'U', [ReferenceToA]),
...
callT(Call, _, _, _, [], Method, [ReferenceToA], _),
preserve_noTypeArgumentsT(Call).

AST Specification

ast_relation_type_spec(preserve_noTypeArgumentsT,[
   ast_arg(id,       mult(1,1,no ), id,   [callT, newT])
]).
research/jtransformer/api/java/pefs/4.0/preserve_notypeargumentst.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019