public class LocalVariableDeclaration extends VariableDeclaration implements LoopInitializer
| Modifier and Type | Field and Description | 
|---|---|
protected ImmutableArray<VariableSpecification> | 
varSpecs
Var specs. 
 | 
parentIsInterfaceDeclaration, typeReferencemodArray| Constructor and Description | 
|---|
LocalVariableDeclaration()
Local variable declaration. 
 | 
LocalVariableDeclaration(ExtList children)
Local variable declaration. 
 | 
LocalVariableDeclaration(ImmutableArray<Modifier> mods,
                        TypeReference typeRef,
                        VariableSpecification var)
Local variable declaration. 
 | 
LocalVariableDeclaration(ImmutableArray<Modifier> mods,
                        TypeReference typeRef,
                        VariableSpecification[] vars)
Local variable declaration. 
 | 
LocalVariableDeclaration(Modifier[] mods,
                        TypeReference typeRef,
                        VariableSpecification[] vars)
Local variable declaration. 
 | 
LocalVariableDeclaration(TypeReference typeRef,
                        VariableSpecification var)
Local variable declaration which declared exactly 
      one variable. 
 | 
| 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<VariableSpecification> | 
getVariables()
This method is identical to  
getVariableSpecifications(). | 
ImmutableArray<VariableSpecification> | 
getVariableSpecifications()
This method is identical to  
getVariables(). | 
boolean | 
isPrivate()
Local variables are never private. 
 | 
boolean | 
isProtected()
Local variables are never protected.. 
 | 
boolean | 
isPublic()
Local variables are never "public". 
 | 
boolean | 
isStatic()
Local variables are never static. 
 | 
boolean | 
isTransient()
Local variables are never 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, isFinal, parentIsInterfaceDeclarationgetModifiers, getStateCount, getVisibilityModifier, isAbstract, isGhost, isModel, isNative, isStrictFp, 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, waitgetComments, matchequalsModRenaming, getEndPosition, getFirstElement, getFirstElementIncludingBlocks, getLastElement, getPositionInfo, getRelativePosition, getStartPositionprotected final ImmutableArray<VariableSpecification> varSpecs
public LocalVariableDeclaration()
public LocalVariableDeclaration(Modifier[] mods, TypeReference typeRef, VariableSpecification[] vars)
mods - a modifier array.typeRef - a type reference.vars - a variable specification array.public LocalVariableDeclaration(TypeReference typeRef, VariableSpecification var)
typeRef - a type reference.var - the variable specificationpublic LocalVariableDeclaration(ImmutableArray<Modifier> mods, TypeReference typeRef, VariableSpecification var)
mods - a modifier array.typeRef - a type reference.var - a variable specification .public LocalVariableDeclaration(ImmutableArray<Modifier> mods, TypeReference typeRef, VariableSpecification[] vars)
mods - a modifier array.typeRef - a type reference.vars - a variable specification array.public LocalVariableDeclaration(ExtList children)
children - an ExtList containing the children. May include: 
  several VariableSpecification (specifying the declared local variable),
        a TypeReference (as reference to the type of the declared variable),
        several Modifier (taken as modifiers of the declaration), 
        a Commentpublic ImmutableArray<VariableSpecification> getVariableSpecifications()
getVariables().public ImmutableArray<VariableSpecification> getVariables()
getVariableSpecifications().getVariables 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 isPrivate()
isPrivate in class JavaDeclarationpublic boolean isProtected()
isProtected in class JavaDeclarationpublic boolean isPublic()
isPublic in class JavaDeclarationpublic boolean isStatic()
isStatic in class JavaDeclarationpublic boolean isTransient()
isTransient 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.