recoder.java.declaration
Class EnumConstantSpecification
java.lang.Object
recoder.java.JavaSourceElement
recoder.java.JavaProgramElement
recoder.java.JavaNonTerminalProgramElement
recoder.java.declaration.VariableSpecification
recoder.java.declaration.FieldSpecification
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
| 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.bytecode.AccessFlags |
ABSTRACT, ANNOTATION, BRIDGE, ENUM, FINAL, INTERFACE, NATIVE, PRIVATE, PROTECTED, PUBLIC, STATIC, STRICT, SUPER, SYNCHRONIZED, SYNTHETIC, TRANSIENT, VARARGS, VOLATILE |
| 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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 -
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