org.extendj.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 org.extendj.ast.ASTNode<ASTNode>
          extended by org.extendj.ast.BodyDecl
              extended by org.extendj.ast.MemberDecl
                  extended by org.extendj.ast.FieldDeclaration
                      extended by org.extendj.ast.EnumConstant
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Iterable<ASTNode>, java.util.Iterator, org.jastadd.util.PrettyPrintable
static class SimpleSet.SimpleSetImpl
           

Description

Source
Declared in /home/jesper/git/extendj/java5/grammar/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 /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 229
Aspect
Enums
public EnumConstant()
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 1
public EnumConstant(Modifiers p0,
                    java.lang.String p1,
                    List<Expr> p2,
                    Opt<Expr> p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 15
public EnumConstant(Modifiers p0,
                    beaver.Symbol p1,
                    List<Expr> p2,
                    Opt<Expr> p3)
 
Source
Declared in /home/jesper/git/extendj/ASTNode at line 21

Attributes

Overrides:isEnumConstant in class BodyDecl
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 48
Aspect
Enums
Overrides:isPublic in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/java4/frontend/Modifiers.jrag at line 280
Aspect
Modifiers
Overrides:isStatic in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/java4/frontend/Modifiers.jrag at line 283
Aspect
Modifiers
Overrides:isFinal in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/java4/frontend/Modifiers.jrag at line 285
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 /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 225
Aspect
Enums
@ASTNodeAnnotation.Attribute
syn org.extendj.ast.SimpleSet localMethodsSignature(java.lang.String signature)
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 737
Aspect
Enums
@ASTNodeAnnotation.Attribute
syn java.util.Map<java.lang.String,org.extendj.ast.SimpleSet> localMethodsSignatureMap()
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 746
Aspect
Enums
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 757
Aspect
Enums
Overrides:flags in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/java4/backend/Flags.jrag at line 134
Aspect
Flags

Methods

public int getNumBodyDecl()
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 284
Aspect
Enums
public BodyDecl getBodyDecl(int i)
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 298
Aspect
Enums
public void prettyPrint(org.jastadd.util.PrettyPrinter out)
Specified by:prettyPrint in interface org.jastadd.util.PrettyPrintableOverrides:prettyPrint in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/java5/frontend/Enums.jrag at line 635
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
Source
Declared in /home/jesper/git/extendj/ASTNode at line 10
protected int numChildren()
Overrides:numChildren in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 30
public boolean mayHaveRewrite()
Overrides:mayHaveRewrite in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 36
public void flushAttrCache()
Overrides:flushAttrCache in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 42
public void flushCollectionCache()
Overrides:flushCollectionCache in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 51
public void flushRewriteCache()
Overrides:flushRewriteCache in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 57
public EnumConstant clone()
                   throws java.lang.CloneNotSupportedException
Overrides:clone in class FieldDeclaration
Throws:
java.lang.CloneNotSupportedException
Source
Declared in /home/jesper/git/extendj/ASTNode at line 63
public EnumConstant copy()
Overrides:copy in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 70
@Deprecated
public EnumConstant fullCopy()
Deprecated. Please use treeCopy or treeCopyNoTransform instead

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
Source
Declared in /home/jesper/git/extendj/ASTNode at line 89
public EnumConstant treeCopyNoTransform()
Create a deep copy of the AST subtree at this node. The copy is dangling, i.e. has no parent.
Overrides:treeCopyNoTransform in class FieldDeclaration
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 99
public EnumConstant treeCopy()
Create a deep copy of the AST subtree at this node. The subtree of this node is traversed to trigger rewrites before copy. The copy is dangling, i.e. has no parent.
Overrides:treeCopy in class FieldDeclaration
Returns:
dangling copy of the subtree at this node
Source
Declared in /home/jesper/git/extendj/ASTNode at line 124
protected boolean is$Equal(ASTNode node)
Overrides:is$Equal in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/ASTNode at line 131
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.
Overrides: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
Parameters:
symbol - Symbol containing the new value for the lexeme ID
@ASTNodeAnnotation.Token(name="ID")
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 boolean hasArg()
Check whether the Arg list has any children.
Returns:
true if it has at least one child, false otherwise.
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.
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> 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 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 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 boolean hasInit()
Check whether the optional Init child exists.
Overrides: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.
Overrides:getInit in class FieldDeclaration
Returns:
The Init child, if it exists. Returns null otherwise.
Retrieves the optional node for the Init child. This is the Opt node containing the child Init, not the actual child!
Overrides:getInitOpt in class FieldDeclaration
Returns:
The optional node for child the Init child.
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)
This method should not be called. This method throws an exception due to the corresponding child being an NTA shadowing a non-NTA child.
Overrides:setTypeAccess in class FieldDeclaration
Parameters:
node -
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.
public org.extendj.ast.NameType Define_nameType(ASTNode caller,
                                                ASTNode child)
Overrides:Define_nameType in class FieldDeclaration
Source
Declared in /home/jesper/git/extendj/java4/frontend/SyntacticClassification.jrag at line 36
protected boolean canDefine_nameType(ASTNode caller,
                                     ASTNode child)
Overrides:rewriteTo in class FieldDeclaration
public int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.lang.String name()
public TypeDecl type()
public java.util.Collection<TypeDecl> throwTypes()
public boolean isParameter()
public boolean isClassVariable()
public boolean isInstanceVariable()
public boolean isMethodParameter()
public boolean isConstructorParameter()
public boolean isLocalVariable()
public boolean isFinal()
public boolean isVolatile()
public boolean isEffectivelyFinal()
public boolean isBlank()
public boolean isStatic()
public boolean isSynthetic()
public org.extendj.ast.Constant constant()

Fields

protected boolean getTypeAccess_computed
protected java.util.Map<java.lang.String,org.extendj.ast.SimpleSet> localMethodsSignatureMap_value
protected boolean flags_computed
protected int flags_value
public static final org.extendj.ast.SimpleSet emptySet
public static final org.extendj.ast.SimpleSet fullSet

Inherited Members

Attributes inherited from org.extendj.ast.FieldDeclaration

Attributes inherited from org.extendj.ast.BodyDecl

Attributes inherited from org.extendj.ast.ASTNode

Methods inherited from class org.extendj.ast.FieldDeclaration

Methods inherited from class org.extendj.ast.BodyDecl

Methods inherited from class org.extendj.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

Fields inherited from org.extendj.ast.FieldDeclaration

Fields inherited from org.extendj.ast.BodyDecl

Fields inherited from org.extendj.ast.ASTNode

Fields inherited from beaver.Symbol

end
id
start
value