Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
This fact is used for preserving the original appearance of the source code after transformations. It declares, that the type parameters in an instance creation for a parameterized type are ommitted.
List<String> list = new ArrayList<>();
instead of
List<String> list = new ArrayList<String>();
new ArrayList<>()
is not the same as new ArrayList()
(without the diamond). The first one inherits the type parameters implicitly from the left-hand-side of the assignment, while the second one is always a raw type, without any type parameters.
id: newT
ID of the corresponding newT
List<String> list = new ArrayList<>();
fieldT(Field, _, FieldType, list, New), newT(New, Field, Field, null, [], _, [], TypeOfNew, null), preserve_diamond(New).
ast_relation_type_spec(preserve_diamondT,[ ast_arg(id, mult(1,1,no ), id, [newT]) ]).