Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
Represents the field declaration.
Renamed in JT 2.8: Up to 2.8.0 it was defined as fieldDefT.
#id: id
the unique ID assigned to this fact.
#class: classT
ID of the enclosing/declaring class.
#type: Type reference
the ID of the type of the field.
'name': atom
the name of the field.
#init: expression, null
ID of the initializer of this variable declaration.
class HelloWorld { //classT String message; //corresponding code line to fieldT }
classT(#class, #compilationUnit, 'HelloWorld', [..., #field]). fieldT(#field, #class, #type, 'message', 'null').
ast_node_def('Java',fieldT,[ ast_arg(id, mult(1,1,no ), id, [fieldT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [classT]), ast_arg(type, mult(1,1,no ), id, [typeInst]), ast_arg(name, mult(1,1,no ), attr,[atom]), ast_arg(expr, mult(0,1,no ), id, [expressionType,nullType]) ]).