Software Engineering for Smart Data Analytics & Smart Data Analytics for Software Engineering
@deprecated
with JT 2.8.0 see classT for current representation
represents the class or interface declaration. Every interface declaration
is accompanied by the additional fact: interfaceT(#id).
Every annotation declaration
is accompanied by an interfaceT(#id) and an annotationT(#id) fact.
#id:
the unique ID assigned to this fact.
#parent: compilationUnitT, classDefT, newClassT, blockT, execT
'name':
the class name, without a package. In the case of anonymous classes, a globally unique name: ANONYMOUS$<UN>, where <UN> is a unique number.
[#def_1,…]: methodDefT, fieldDeftT, classDefT, annotationMemberT
list of IDs for other facts representing the methods or fields, and inner classes. These fields and methods are the members (not necessarily public!) of the class.
Note: There is no difference between normal and abstract classes.
class HelloWorld { //corresponding code line to classDefT ... }
classDefT(#id, 'null', 'HelloWorld', [fqn('HelloWorld', '<init>', []), #def_2, #def_3]).
% tree_constraints(classDefT ,[[execT,packageT,classDefT,newClassT,blockT,nullType],[atom],[methodDefT,fieldDefT,classDefT]]). ast_node_def('Java',classDefT,[ ast_arg(id, mult(1,1,no ), id, [classDefT]), % <-- convention!!! ast_arg(parent, mult(1,1,no ), id, [execT,compilationUnitT,packageT ,classDefT, newClassT, blockT]), ast_arg(name, mult(1,1,no ), attr,[atom]), ast_arg(defs, mult(0,*,ord), id, [methodDefT,fieldDefT,classDefT,annotationMemberT]) ]).