Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents the array creation expression.
Optionally marked with an preserve_omitArrayDeclarationT.
#id: id
the unique ID assigned to this fact.
#parent: id
ID of the parent node.
#encl: methodT, constructorT, classInitializerT, fieldT, classT, annotationMemberT, annotationT
ID of the fact that represents the enclosing element.
[#dim_1,…]: expression
list of dimension expressions.
[#elem_1,…]: expression, annotationExpressionType
list of initial elements of this array.
#type: Type reference
the id of the type of this array.
void myArrayAcces(){ int[] array = {1, 3, 8};//corresponding code line to newArrayt array[0]= 9; }
methodDefT(#encl, ..., 'myArrayAcces', [], #returntype, [], ...). localDefT(#parent, ..., #encl, type(basic, int, 1), 'array', #id). newArrayT(#id, #parent, #encl, [], [#elem_1, #elem_2, #elem_3], #newarraytype). omitArrayDeclarationT(#id). literalT(#elem_1, #id, #encl, #literal1type, '1'). literalT(#elem_2, #id, #encl, #literal2type, '3'). literalT(#elem_3, #id, #encl, #literal3type, '8').
ast_node_type_spec(newArrayT,[ ast_arg(id, mult(1,1,no ), id, [newArrayT]), ast_arg(parent, mult(1,1,no ), id, [id]), ast_arg(encl, mult(1,1,no ), id, [methodT, constructorT, classInitializerT, fieldT, classT, annotationMemberT, packageT]), ast_arg(dims, mult(1,*,ord), id, [expressionType]), ast_arg(elems, mult(0,*,ord), id, [expressionType,annotationExpressionType]), ast_arg(type, mult(1,1,no ), id, [type_inst]) ]).