public class FieldDeclaration extends VariableDeclaration implements MemberDeclaration
| Modifier and Type | Field and Description | 
|---|---|
protected ImmutableArray<FieldSpecification> | 
fieldSpecs
Field specs. 
 | 
parentIsInterfaceDeclaration, typeReferencemodArray| Constructor and Description | 
|---|
FieldDeclaration(ExtList children,
                boolean parentIsInterfaceDeclaration)
Field declaration. 
 | 
FieldDeclaration(Modifier[] mods,
                TypeReference typeRef,
                FieldSpecification[] vars,
                boolean parentIsInterfaceDeclaration)
Field declaration. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
ProgramElement | 
getChildAt(int index)
Returns the child at the specified index in this node's "virtual"
      child array 
 | 
int | 
getChildCount()
Returns the number of children of this node. 
 | 
ImmutableArray<FieldSpecification> | 
getFieldSpecifications()  | 
ImmutableArray<? extends VariableSpecification> | 
getVariables()
Get variables. 
 | 
boolean | 
isFinal()
Test whether the declaration is final. 
 | 
boolean | 
isGhost()
Test whether the declaration is ghost (the jml modifier is meant). 
 | 
boolean | 
isModel()
Test whether the declaration is model (the jml modifier is meant). 
 | 
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 | 
isStrictFp()
Test whether the declaration is strict FP. 
 | 
boolean | 
isTransient()
Test whether the declaration is transient. 
 | 
void | 
prettyPrint(PrettyPrinter p)
Pretty printing the source element. 
 | 
void | 
visit(Visitor v)
calls the corresponding method of a visitor in order to
 perform some action/transformation on this element 
 | 
getFirstElement, getFirstElementIncludingBlocks, getLastElement, getTypeReference, getTypeReferenceAt, getTypeReferenceCount, parentIsInterfaceDeclarationgetModifiers, getStateCount, getVisibilityModifier, isAbstract, isNative, isSynchronized, isVolatilecompatibleBlockSize, computeHashCode, equals, equalsModRenaming, getArrayPos, match, matchChildrengetComments, hashCode, prettyPrintMain, reuseSignaturegetEndPosition, getParentClass, getPositionInfo, getRelativePosition, getStartPosition, setParentClass, toSource, toString, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetModifiersgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPositionprotected final ImmutableArray<FieldSpecification> fieldSpecs
public FieldDeclaration(Modifier[] mods, TypeReference typeRef, FieldSpecification[] vars, boolean parentIsInterfaceDeclaration)
mods - a modifier mutable list.typeRef - a type reference.vars - a variable specification array.parentIsInterfaceDeclaration - a boolean set true 
 iff parent is an InterfaceDeclarationpublic FieldDeclaration(ExtList children, boolean parentIsInterfaceDeclaration)
children - an ExtList of children. May include:
        several FieldSpecification (for the field)
        a TypeReference (as reference to the type of the declared variable)
        several Modifier (taken as modifiers of the declaration), 
        a CommentparentIsInterfaceDeclaration - a boolean set truepublic ImmutableArray<FieldSpecification> getFieldSpecifications()
public ImmutableArray<? extends VariableSpecification> getVariables()
VariableDeclarationgetVariables in class VariableDeclarationpublic int getChildCount()
getChildCount in interface NonTerminalProgramElementpublic ProgramElement getChildAt(int index)
getChildAt in interface NonTerminalProgramElementindex - an index into this node's "virtual" child arrayjava.lang.ArrayIndexOutOfBoundsException - if index is out
                 of boundspublic boolean isFinal()
isFinal in class VariableDeclarationpublic boolean isPrivate()
isPrivate in interface MemberDeclarationisPrivate in class JavaDeclarationpublic boolean isProtected()
isProtected in interface MemberDeclarationisProtected in class JavaDeclarationpublic boolean isPublic()
isPublic in interface MemberDeclarationisPublic in class JavaDeclarationpublic boolean isStatic()
JavaDeclarationisStatic in interface MemberDeclarationisStatic in class JavaDeclarationpublic boolean isTransient()
isTransient in class JavaDeclarationpublic boolean isStrictFp()
isStrictFp in interface MemberDeclarationisStrictFp in class JavaDeclarationpublic boolean isModel()
isModel in class JavaDeclarationpublic boolean isGhost()
isGhost in class JavaDeclarationpublic void visit(Visitor v)
visit in interface SourceElementvisit in class VariableDeclarationv - the Visitorpublic void prettyPrint(PrettyPrinter p) throws java.io.IOException
JavaSourceElementprettyPrint in interface SourceElementprettyPrint in class VariableDeclarationp - a pretty printer.java.io.IOException - occasionally thrown.