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

User Tools

Site Tools

fieldT(#id, #class, #type, 'name', #init)

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, null
ID of the enclosing/declaring class or null if it is the “length” field of an array.

#type: typeinst
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.

Sample Java Source

class HelloWorld { //classT

  String message; //corresponding code line to fieldT


Its PEF Representation

classT(#class, #compilationUnit, 'HelloWorld', [], [..., #field]).
fieldT(#field, #class, #type, 'message', 'null').

AST Specification

     ast_arg(id,      mult(1,1,no ), id,  [fieldT]),
     ast_arg(parent,  mult(1,1,no ), id,  [classT, nullType]),
     ast_arg(type,    mult(1,1,no ), id,  [type_inst]),
     ast_arg(name,    mult(1,1,no ), attr,[atomic]),
     ast_arg(init,    mult(0,1,no ), id,  [expressionType, nullType])
research/jtransformer/api/java/pefs/4.2/fieldt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024