public class ParameterDeclaration extends VariableDeclaration
| Modifier and Type | Field and Description | 
|---|---|
private boolean | 
varArgParameter
flag to store whether this parameter is a the last arg in a method
 declaration with variable number of arguments. false if not otherwise
 set in the appropriate constructor. 
 | 
protected ImmutableArray<VariableSpecification> | 
varSpec
Var spec. 
 | 
parentIsInterfaceDeclaration, typeReferencemodArray| Constructor and Description | 
|---|
ParameterDeclaration()
Parameter declaration. 
 | 
ParameterDeclaration(ExtList children,
                    boolean parentIsInterfaceDeclaration,
                    boolean parameterIsVarArg)
Parameter declaration. 
 | 
ParameterDeclaration(Modifier[] mods,
                    TypeReference typeRef,
                    VariableSpecification var,
                    boolean parentIsInterfaceDeclaration)
Parameter declaration. 
 | 
ParameterDeclaration(Modifier[] mods,
                    TypeReference typeRef,
                    VariableSpecification var,
                    boolean parentIsInterfaceDeclaration,
                    boolean parameterIsVarArg)
Parameter 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<VariableSpecification> | 
getVariables()
Get variables. 
 | 
VariableSpecification | 
getVariableSpecification()  | 
boolean | 
isPrivate()
Parameters are never private. 
 | 
boolean | 
isProtected()
Parameters are never protected. 
 | 
boolean | 
isPublic()
Parameters are never public. 
 | 
boolean | 
isStatic()
Parameters are never static. 
 | 
boolean | 
isTransient()
Parameters are never transient. 
 | 
boolean | 
isVarArg()
returns true iff this parameter is the last in a method with 
 a variable number of arguments. 
 | 
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, parentIsInterfaceDeclaration, prettyPrintgetModifiers, 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, getPositionInfo, getRelativePosition, getStartPositionprotected final ImmutableArray<VariableSpecification> varSpec
private final boolean varArgParameter
public ParameterDeclaration()
public ParameterDeclaration(Modifier[] mods, TypeReference typeRef, VariableSpecification var, boolean parentIsInterfaceDeclaration, boolean parameterIsVarArg)
mods - a modifier array.typeRef - a type reference.var - the VariableSpecification belonging to this parameter declaration.parentIsInterfaceDeclaration - a boolean set true iff
 the parent is an InterfaceDeclarationparameterIsVarArg - true iff this the last parameter of a method with variable number
 of argumentspublic ParameterDeclaration(Modifier[] mods, TypeReference typeRef, VariableSpecification var, boolean parentIsInterfaceDeclaration)
mods - a modifier array.typeRef - a type reference.var - the VariableSpecification belonging to this parameter declaration.parentIsInterfaceDeclaration - a boolean set true iff
 the parent is an InterfaceDeclarationpublic ParameterDeclaration(ExtList children, boolean parentIsInterfaceDeclaration, boolean parameterIsVarArg)
children - an ExtList of children. May contain:    
  a VariableSpecification (specifying the parameter)
  a TypeReference (as reference to the type of the declared variable)
        several Modifier (taken as modifiers of the declaration), 
        a CommentparentIsInterfaceDeclaration - a boolean set true iff
 the parent is an InterfaceDeclarationparameterIsVarArg - true iff this the last parameter of a method with variable number
 of argumentspublic VariableSpecification getVariableSpecification()
public ImmutableArray<VariableSpecification> getVariables()
VariableDeclarationgetVariables in class VariableDeclarationpublic int getChildCount()
public ProgramElement getChildAt(int index)
index - 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 boolean isVarArg()