SDA SE Wiki

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

User Tools

Site Tools


@deprecated with JT 2.8.0 see fieldT for current representation


fieldDefT(#id, #class, TYPE, 'name', #init)

represents the field declaration.

Arguments

#id:
the unique ID assigned to this fact.

#class: classDefT
ID of the enclosing/declaring class.

TYPE:
is a valid typeterm.

'name':
the name of the variable.

#init: expression, null
ID of the initializer of this variable declaration.

Sample Java Source

class HelloWorld extends HelloUniverse { //classDefT

  static String message; //corresponding code line to fieldDefT

}

Its PEF Representation

classDefT(#class, 'null', 'HelloWorld', [fqn('HelloWorld', '<init>', []), #id, ...]).
fieldDefT(#id, #class, type(class, ..., 0), 'message', 'null').

AST Specification

ast_node_def('Java',fieldDefT,[
     ast_arg(id,      mult(1,1,no ), id,  [fieldDefT]), % <-- convention!!!
     ast_arg(parent,  mult(1,1,no ), id,  [classDefT]),
     ast_arg(type,    mult(1,1,no ), attr,[typeTermType]), % <-- dieser typ ist noch undefined
     ast_arg(name,    mult(1,1,no ), attr,[atom]),
     ast_arg(expr,    mult(0,1,no ), id,  [expressionType,nullType])
% The following pseudo-components are now in ast_relation(Java, Reltype, Defs):  
%     ast_arg(hasModif,mult(0,*,no ), attr,[atom])
]).
research/jtransformer/api/java/pefs/old/fielddeft.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2024