RECODER 0.92

recoder.java.declaration
Class EnumConstantSpecification

java.lang.Object
  extended by recoder.java.JavaSourceElement
      extended by recoder.java.JavaProgramElement
          extended by recoder.java.JavaNonTerminalProgramElement
              extended by recoder.java.declaration.VariableSpecification
                  extended by recoder.java.declaration.FieldSpecification
                      extended by recoder.java.declaration.EnumConstantSpecification
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, EnumConstant, Field, Member, ProgramModelElement, Variable, AccessFlags, Declaration, ExpressionContainer, NamedProgramElement, NonTerminalProgramElement, ProgramElement, SourceElement, ModelElement, NamedModelElement

public class EnumConstantSpecification
extends FieldSpecification
implements EnumConstant

Author:
Tobias Gutzmann
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Nested classes/interfaces inherited from interface recoder.abstraction.ProgramModelElement
ProgramModelElement.LexicalOrder
 
Nested classes/interfaces inherited from interface recoder.java.ProgramElement
ProgramElement.TreeStructure
 
Nested classes/interfaces inherited from interface recoder.java.SourceElement
SourceElement.Position
 
Nested classes/interfaces inherited from interface recoder.java.ProgramElement
ProgramElement.TreeStructure
 
Nested classes/interfaces inherited from interface recoder.java.SourceElement
SourceElement.Position
 
Nested classes/interfaces inherited from interface recoder.java.ProgramElement
ProgramElement.TreeStructure
 
Nested classes/interfaces inherited from interface recoder.java.SourceElement
SourceElement.Position
 
Field Summary
 
Fields inherited from class recoder.java.JavaSourceElement
factory
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Fields inherited from interface recoder.abstraction.ProgramModelElement
LEXICAL_ORDER
 
Fields inherited from interface recoder.bytecode.AccessFlags
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE
 
Fields inherited from interface recoder.java.ProgramElement
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
 
Fields inherited from interface recoder.java.ProgramElement
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
 
Fields inherited from interface recoder.java.ProgramElement
STRUCTURAL_EQUALITY, STRUCTURAL_HASH_CODE
 
Constructor Summary
EnumConstantSpecification()
           
EnumConstantSpecification(EnumConstantSpecification proto)
           
EnumConstantSpecification(Identifier name)
           
EnumConstantSpecification(Identifier name, EnumConstructorReference ref)
           
 
Method Summary
 void accept(SourceVisitor v)
          Receive a visitor, for instance a pretty printer.
 EnumConstantSpecification deepClone()
          Deep clone.
 ProgramElement getChildAt(int pos)
          Returns the child at the specified index in this node's "virtual" child array
 int getChildCount()
          Returns the number of children of this node.
 EnumConstructorReference getConstructorReference()
           
 EnumConstantDeclaration getParent()
          Get parent.
 ASTList<TypeArgumentDeclaration> getTypeArguments()
          get type arguments of parent's type reference
 void makeParentRoleValid()
          Make parent role valid.
 void setConstructorReference(EnumConstructorReference ref)
           
 void validate()
          Defaults to do nothing.
 
Methods inherited from class recoder.java.declaration.FieldSpecification
getAnnotations, getBinaryName, getContainingClassType, getFullName, isPrivate, isProtected, isPublic, isStatic, isTransient, isVolatile, setParent, setParent
 
Methods inherited from class recoder.java.declaration.VariableSpecification
getASTParent, getChildPositionCode, getDeclarationSpecifiers, getDimensions, getExpressionAt, getExpressionCount, getFirstElement, getIdentifier, getInitializer, getLastElement, getName, getProgramModelInfo, getType, isFinal, isStrictFp, replaceChild, setDeclarationSpecifiers, setDimensions, setIdentifier, setInitializer, setProgramModelInfo
 
Methods inherited from class recoder.java.JavaNonTerminalProgramElement
getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
 
Methods inherited from class recoder.java.JavaProgramElement
getComments, getID, setComments
 
Methods inherited from class recoder.java.JavaSourceElement
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface recoder.abstraction.Variable
getType, isFinal
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getBinaryName, getFullName, getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.abstraction.Member
getAnnotations, getContainingClassType, isFinal, isPrivate, isProtected, isPublic, isStatic, isStrictFp
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getBinaryName, getFullName, getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.java.NonTerminalProgramElement
getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
 
Methods inherited from interface recoder.java.ProgramElement
getComments, getID, setComments
 
Methods inherited from interface recoder.java.SourceElement
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
 
Methods inherited from interface recoder.java.NonTerminalProgramElement
getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
 
Methods inherited from interface recoder.java.ProgramElement
getComments, getID, setComments
 
Methods inherited from interface recoder.java.SourceElement
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
 
Methods inherited from interface recoder.java.NonTerminalProgramElement
getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
 
Methods inherited from interface recoder.java.ProgramElement
getComments, getID, setComments
 
Methods inherited from interface recoder.java.SourceElement
getEndPosition, getFactory, getRelativePosition, getStartPosition, setEndPosition, setRelativePosition, setStartPosition, toSource
 

Constructor Detail

EnumConstantSpecification

public EnumConstantSpecification()

EnumConstantSpecification

public EnumConstantSpecification(Identifier name)
Parameters:
name -

EnumConstantSpecification

public EnumConstantSpecification(Identifier name,
                                 EnumConstructorReference ref)
Parameters:
name -
init -

EnumConstantSpecification

public EnumConstantSpecification(EnumConstantSpecification proto)
Parameters:
proto -
Method Detail

accept

public void accept(SourceVisitor v)
Description copied from interface: SourceElement
Receive a visitor, for instance a pretty printer.

Specified by:
accept in interface SourceElement
Overrides:
accept in class FieldSpecification
Parameters:
v - a source visitor.

deepClone

public EnumConstantSpecification deepClone()
Description copied from class: FieldSpecification
Deep clone.

Specified by:
deepClone in interface SourceElement
Overrides:
deepClone in class FieldSpecification
Returns:
the object.

getParent

public EnumConstantDeclaration getParent()
Description copied from class: VariableSpecification
Get parent.

Overrides:
getParent in class VariableSpecification
Returns:
the variable declaration.

makeParentRoleValid

public void makeParentRoleValid()
Description copied from class: VariableSpecification
Make parent role valid.

Specified by:
makeParentRoleValid in interface NonTerminalProgramElement
Overrides:
makeParentRoleValid in class VariableSpecification

getChildCount

public int getChildCount()
Description copied from class: VariableSpecification
Returns the number of children of this node.

Specified by:
getChildCount in interface NonTerminalProgramElement
Overrides:
getChildCount in class VariableSpecification
Returns:
an int giving the number of children of this node

getChildAt

public ProgramElement getChildAt(int pos)
Description copied from class: VariableSpecification
Returns the child at the specified index in this node's "virtual" child array

Specified by:
getChildAt in interface NonTerminalProgramElement
Overrides:
getChildAt in class VariableSpecification
Parameters:
pos - an index into this node's "virtual" child array
Returns:
the program element at the given position

getConstructorReference

public EnumConstructorReference getConstructorReference()

setConstructorReference

public void setConstructorReference(EnumConstructorReference ref)

validate

public void validate()
              throws ModelException
Description copied from class: JavaProgramElement
Defaults to do nothing.

Specified by:
validate in interface ModelElement
Overrides:
validate in class JavaProgramElement
Throws:
ModelException
See Also:
SemanticsChecker

getTypeArguments

public ASTList<TypeArgumentDeclaration> getTypeArguments()
Description copied from class: FieldSpecification
get type arguments of parent's type reference

Specified by:
getTypeArguments in interface Field
Overrides:
getTypeArguments in class FieldSpecification

RECODER 0.92