RECODER 0.92

recoder.java.declaration
Class FieldSpecification

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
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

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
  FieldSpecification()
          Field specification.
protected FieldSpecification(FieldSpecification proto)
          Field specification.
  FieldSpecification(Identifier name)
          Field specification.
  FieldSpecification(Identifier name, Expression init)
          Field specification.
  FieldSpecification(Identifier name, int dimensions, Expression init)
          Field specification.
 
Method Summary
 void accept(SourceVisitor v)
          Receive a visitor, for instance a pretty printer.
 FieldSpecification deepClone()
          Deep clone.
 java.util.List<AnnotationUseSpecification> getAnnotations()
          get annotations of enclosing declaration
 java.lang.String getBinaryName()
          Returns the binary name.
 ClassType getContainingClassType()
          Returns the logical parent type of this member.
 java.lang.String getFullName()
          Returns the maximal expanded name including all applicable qualifiers.
 ASTList<TypeArgumentDeclaration> getTypeArguments()
          get type arguments of parent's type reference
 boolean isPrivate()
          Test whether the declaration is private.
 boolean isProtected()
          Test whether the declaration is protected.
 boolean isPublic()
          Test whether the declaration is public.
 boolean isStatic()
          Test whether the declaration is static.
 boolean isTransient()
          Test whether the declaration is transient.
 boolean isVolatile()
          Test whether the declaration is volatile.
 void setParent(FieldDeclaration parent)
          Set parent.
 void setParent(VariableDeclaration parent)
          Set parent.
 
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 recoder.java.JavaNonTerminalProgramElement
getIndexOfChild, getRoleOfChild, makeAllParentRolesValid, validateAll
 
Methods inherited from class recoder.java.JavaProgramElement
getComments, getID, setComments, validate
 
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
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
Methods inherited from interface recoder.abstraction.Member
isFinal, isStrictFp
 
Methods inherited from interface recoder.abstraction.ProgramModelElement
getProgramModelInfo, setProgramModelInfo
 
Methods inherited from interface recoder.NamedModelElement
getName
 
Methods inherited from interface recoder.ModelElement
validate
 
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

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.
Method Detail

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

RECODER 0.92