recoder.java.declaration
Class FieldSpecification
java.lang.Object
recoder.java.JavaSourceElement
recoder.java.JavaProgramElement
recoder.java.JavaNonTerminalProgramElement
recoder.java.declaration.VariableSpecification
recoder.java.declaration.FieldSpecification
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Field, Member, ProgramModelElement, Variable, AccessFlags, Declaration, ExpressionContainer, NamedProgramElement, NonTerminalProgramElement, ProgramElement, SourceElement, ModelElement, NamedModelElement
- Direct Known Subclasses:
- EnumConstantSpecification
public class FieldSpecification
- extends VariableSpecification
- implements Field
- 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.VariableSpecification |
getASTParent, getChildAt, getChildCount, getChildPositionCode, getDeclarationSpecifiers, getDimensions, getExpressionAt, getExpressionCount, getFirstElement, getIdentifier, getInitializer, getLastElement, getName, getParent, getProgramModelInfo, getType, isFinal, isStrictFp, makeParentRoleValid, replaceChild, setDeclarationSpecifiers, setDimensions, setIdentifier, setInitializer, setProgramModelInfo |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldSpecification
public FieldSpecification()
- Field specification.
FieldSpecification
public FieldSpecification(Identifier name)
- Field specification.
- Parameters:
name - an identifier.
FieldSpecification
public FieldSpecification(Identifier name,
Expression init)
- Field specification.
- Parameters:
name - an identifier.init - an expression.
FieldSpecification
public FieldSpecification(Identifier name,
int dimensions,
Expression init)
- Field specification.
- Parameters:
name - an identifier.dimensions - an int value.init - an expression.
FieldSpecification
protected FieldSpecification(FieldSpecification proto)
- Field specification.
- Parameters:
proto - a field specification.
deepClone
public FieldSpecification deepClone()
- Deep clone.
- Specified by:
deepClone in interface SourceElement- Overrides:
deepClone in class VariableSpecification
- Returns:
- the object.
setParent
public void setParent(VariableDeclaration parent)
- Set parent.
- Overrides:
setParent in class VariableSpecification
- Parameters:
parent - must be a field declaration.
setParent
public void setParent(FieldDeclaration parent)
- Set parent.
- Parameters:
parent - a field declaration.
isPrivate
public boolean isPrivate()
- Test whether the declaration is private.
- Specified by:
isPrivate in interface Member
- Returns:
true if this member is private, false
otherwise.
isProtected
public boolean isProtected()
- Test whether the declaration is protected.
- Specified by:
isProtected in interface Member
- Returns:
true if this member is protected, false
otherwise.
isPublic
public boolean isPublic()
- Test whether the declaration is public.
- Specified by:
isPublic in interface Member
- Returns:
true if this member is public, false
otherwise.
isStatic
public boolean isStatic()
- Test whether the declaration is static.
- Specified by:
isStatic in interface Member
- Returns:
true if this member is static, false
otherwise.
isTransient
public boolean isTransient()
- Test whether the declaration is transient.
isVolatile
public boolean isVolatile()
- Test whether the declaration is volatile.
getContainingClassType
public ClassType getContainingClassType()
- Description copied from interface:
Member
- Returns the logical parent type of this member.
- Specified by:
getContainingClassType in interface Member
- Returns:
- the class type containing this member.
getFullName
public java.lang.String getFullName()
- Description copied from interface:
ProgramModelElement
- Returns the maximal expanded name including all applicable qualifiers.
- Specified by:
getFullName in interface ProgramModelElement- Overrides:
getFullName in class VariableSpecification
- Returns:
- the full name of this program model element.
getBinaryName
public java.lang.String getBinaryName()
- Description copied from interface:
ProgramModelElement
- Returns the binary name. The binary name
is the name this program model element would have in bytecode, i.e.,
how it either is read by the bytecode parser, or the name a compiler
would give this element during the compilation process (if this program
model element is represented in source code).
See JLS, §13.1
- Specified by:
getBinaryName in interface ProgramModelElement- Overrides:
getBinaryName in class VariableSpecification
- Returns:
- the bytecode name of this program model element
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 VariableSpecification
- Parameters:
v - a source visitor.
getAnnotations
public java.util.List<AnnotationUseSpecification> getAnnotations()
- get annotations of enclosing declaration
- Specified by:
getAnnotations in interface Member
- Returns:
- the annotations
getTypeArguments
public ASTList<TypeArgumentDeclaration> getTypeArguments()
- get type arguments of parent's type reference
- Specified by:
getTypeArguments in interface Field