SDA SE Wiki

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

User Tools

Site Tools



enumConstantT(#id, #parent, #encl, 'name', #args)

Java 5 Syntax Element

Represents the field declaration in enumeration.

Attributes

#id: id
the unique ID assigned to this fact.

#parent: enumT
the id of the parent enumT.

#encl: id
ID of the enclosing PEF.

'name': atom
the name of the field.

#args expression
list of arguments for the enum constant

Sample Java Source

public enum Week {
	Monday	
}

Its PEF Representation

classT(#Class, _, 'Week', []),
enumT(#Class),
...
fieldT(#Field, #Class, #Type, 'Monday', #Init),
enumConstantT(#Field, #Class, #Field, 'Monday', []),
...

AST Specification

ast_relation('Java',enumConstantT,[
     ast_arg(id,     mult(1,1,no ),  id,   [fieldT]),
     ast_arg(parent, mult(1,1,no ),  id,   [enumT]),
     ast_arg(encl,   mult(1,1,no ),  id,   [id]),   
     ast_arg(name,   mult(1,1,no ),  attr, [atom]),
     ast_arg(args,   mult(0,*,ord ), id,   [expressionType])
]).
research/jtransformer/api/java/pefs/2.9/enumconstantt.txt · Last modified: 2018/05/09 01:59 (external edit)

SEWiki, © 2019