AST
node type EnumConstant

General Info

Production
EnumConstant : FieldDeclaration ::= Modifiers <ID:String> Arg:Expr* [Init:Expr] TypeAccess:Access;
Type Hierarchy:
java.lang.Object
  extended by beaver.Symbol
      extended by AST.ASTNode<ASTNode>
          extended by AST.BodyDecl
              extended by AST.MemberDecl
                  extended by AST.FieldDeclaration
                      extended by AST.EnumConstant
All Implemented Interfaces:
SimpleSet, Variable, java.lang.Cloneable, java.lang.Iterable<ASTNode>, java.util.Iterator

Nested classes/interfaces inherited from interface AST.SimpleSet

Description

Source
Declared in Java1.5Frontend/Enums.ast at line 3

Member Filters

API level:

Aspect:

Constructors

public EnumConstant(Modifiers mods,
                    java.lang.String name,
                    List<Expr> args,
                    List<BodyDecl> bds)
 
Source
Declared in Java1.5Frontend/Enums.jrag at line 197
Aspect
Enums
public EnumConstant()
 
public EnumConstant(Modifiers p0,
                    java.lang.String p1,
                    List<Expr> p2,
                    Opt<Expr> p3)
 
public EnumConstant(Modifiers p0,
                    beaver.Symbol p1,
                    List<Expr> p2,
                    Opt<Expr> p3)
 

Attributes

syn boolean isEnumConstant()
Overrides:isEnumConstant in class BodyDecl
Source
Declared in Java1.5Frontend/Enums.jrag at line 26
Aspect
Enums
syn boolean isPublic()
Overrides:isPublic in class FieldDeclaration
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 239
Aspect
Modifiers
syn boolean isStatic()
Specified by:isStatic in interface VariableOverrides:isStatic in class FieldDeclaration
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 242
Aspect
Modifiers
syn boolean isFinal()
Specified by:isFinal in interface VariableOverrides:isFinal in class FieldDeclaration
Source
Declared in Java1.4Frontend/Modifiers.jrag at line 244
Aspect
Modifiers
Description copied from class: FieldDeclaration
Retrieves the TypeAccess child.
Overrides:getTypeAccess in class FieldDeclaration
Returns:
The current node used as the TypeAccess child.
Source
Declared in Java1.5Frontend/Enums.jrag at line 193
Aspect
Enums
syn SimpleSet localMethodsSignature(java.lang.String signature)
Source
Declared in Java1.5Frontend/Enums.jrag at line 689
Aspect
Enums
syn java.util.HashMap localMethodsSignatureMap()
Source
Declared in Java1.5Frontend/Enums.jrag at line 696
Aspect
Enums
syn boolean implementsMethod(MethodDecl method)
Source
Declared in Java1.5Frontend/Enums.jrag at line 707
Aspect
Enums
syn int flags()
Overrides:flags in class FieldDeclaration
Source
Declared in Java1.5Backend/EnumsCodegen.jrag at line 14
Aspect
EnumsCodegen

Methods

public void flushCache()
Overrides:flushCache in class FieldDeclaration
public EnumConstant clone()
                   throws java.lang.CloneNotSupportedException
Overrides:clone in class FieldDeclaration
Throws:
java.lang.CloneNotSupportedException
Overrides:copy in class FieldDeclaration
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:fullCopy in class FieldDeclaration
Returns:
dangling copy of the subtree at this node
public int getNumBodyDecl()
Source
Declared in Java1.5Frontend/Enums.jrag at line 249
Aspect
Enums
public BodyDecl getBodyDecl(int i)
Source
Declared in Java1.5Frontend/Enums.jrag at line 260
Aspect
Enums
public void toString(java.lang.StringBuffer s)
Overrides:toString in class FieldDeclaration
Source
Declared in Java1.5Frontend/Enums.jrag at line 592
Aspect
Enums
public void init$Children()
Initializes the child array to the correct size. Initializes List and Opt nta children.
Overrides:init$Children in class FieldDeclaration
protected int numChildren()
Overrides:numChildren in class FieldDeclaration
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class FieldDeclaration
public void setModifiers(Modifiers node)
Replaces the Modifiers child.
Overrides:setModifiers in class FieldDeclaration
Parameters:
node - The new node to replace the Modifiers child.
Retrieves the Modifiers child.
Specified by:getModifiers in interface VariableOverrides:getModifiers in class FieldDeclaration
Returns:
The current node used as the Modifiers child.
Retrieves the Modifiers child.

This method does not invoke AST transformations.

Overrides:getModifiersNoTransform in class FieldDeclaration
Returns:
The current node used as the Modifiers child.
public void setID(java.lang.String value)
Replaces the lexeme ID.
Overrides:setID in class FieldDeclaration
Parameters:
value - The new value for the lexeme ID.
public void setID(beaver.Symbol symbol)
JastAdd-internal setter for lexeme ID using the Beaver parser.
Overrides:setID in class FieldDeclaration
public java.lang.String getID()
Retrieves the value for the lexeme ID.
Overrides:getID in class FieldDeclaration
Returns:
The value for the lexeme ID.
public void setArgList(List<Expr> list)
Replaces the Arg list.
Parameters:
list - The new list node to be used as the Arg list.
public int getNumArg()
Retrieves the number of children in the Arg list.
Returns:
Number of children in the Arg list.
Retrieves the number of children in the Arg list. Calling this method will not trigger rewrites..
Returns:
Number of children in the Arg list.
public Expr getArg(int i)
Retrieves the element at index i in the Arg list..
Parameters:
i - Index of the element to return.
Returns:
The element at position i in the Arg list.
public void addArg(Expr node)
Append an element to the Arg list.
Parameters:
node - The element to append to the Arg list.
public void addArgNoTransform(Expr node)
public void setArg(Expr node,
                   int i)
Replaces the Arg list element at index i with the new node node.
Parameters:
node - The new node to replace the old list element.
i - The list index of the node to be replaced.
public List<Expr> getArgs()
Retrieves the Arg list.
Returns:
The node representing the Arg list.
Retrieves the Arg list.

This method does not invoke AST transformations.

Returns:
The node representing the Arg list.
public List<Expr> getArgList()
Retrieves the Arg list.
Returns:
The node representing the Arg list.
Retrieves the Arg list.

This method does not invoke AST transformations.

Returns:
The node representing the Arg list.
public void setInitOpt(Opt<Expr> opt)
Replaces the optional node for the Init child. This is the Opt node containing the child Init, not the actual child!
Overrides:setInitOpt in class FieldDeclaration
Parameters:
opt - The new node to be used as the optional node for the Init child.
public boolean hasInit()
Check whether the optional Init child exists.
Specified by:hasInit in interface VariableOverrides:hasInit in class FieldDeclaration
Returns:
true if the optional Init child exists, false if it does not.
public Expr getInit()
Retrieves the (optional) Init child.
Specified by:getInit in interface VariableOverrides:getInit in class FieldDeclaration
Returns:
The Init child, if it exists. Returns null otherwise.
public void setInit(Expr node)
Replaces the (optional) Init child.
Overrides:setInit in class FieldDeclaration
Parameters:
node - The new node to be used as the Init child.
public Opt<Expr> getInitOpt()
Overrides:getInitOpt in class FieldDeclaration
Retrieves the optional node for child Init. This is the Opt node containing the child Init, not the actual child!

This method does not invoke AST transformations.

Overrides:getInitOptNoTransform in class FieldDeclaration
Returns:
The optional node for child Init.
public void setTypeAccess(Access node)
Replaces the TypeAccess child.
Overrides:setTypeAccess in class FieldDeclaration
Parameters:
node - The new node to replace the TypeAccess child.
Retrieves the TypeAccess child.

This method does not invoke AST transformations.

Overrides:getTypeAccessNoTransform in class FieldDeclaration
Returns:
The current node used as the TypeAccess child.
Retrieves the child position of the optional child TypeAccess.
Returns:
The the child position of the optional child TypeAccess.
Overrides:Define_NameType_nameType in class FieldDeclaration
Source
Declared in Java1.5Frontend/Enums.jrag at line 489
Overrides:rewriteTo in class FieldDeclaration

Fields

protected boolean getTypeAccess_computed
protected java.util.HashMap localMethodsSignatureMap_value
protected boolean flags_computed
protected int flags_value

Inherited Members

Attributes inherited from AST.FieldDeclaration

Attributes inherited from AST.BodyDecl

Attributes inherited from AST.ASTNode

Methods inherited from class AST.FieldDeclaration

Methods inherited from class AST.BodyDecl

Methods inherited from class AST.ASTNode

Methods inherited from class beaver.Symbol

getColumn
getEnd
getId
getLine
getStart
makePosition

Methods inherited from class java.lang.Object

equals
finalize
getClass
hashCode
notify
notifyAll
wait
wait
wait

Methods inherited from interface AST.SimpleSet

Methods inherited from interface AST.Variable

Fields inherited from AST.FieldDeclaration

Fields inherited from AST.BodyDecl

Fields inherited from AST.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value

Fields inherited from interface AST.SimpleSet