public final class Parameter extends Node implements NodeWithType<Parameter,Type<?>>, NodeWithElementType<Parameter>, NodeWithAnnotations<Parameter>, NodeWithSimpleName<Parameter>, NodeWithModifiers<Parameter>, NodeWithVariableDeclaratorId<Parameter>
Node.ObserverRegistrationModeABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration| Constructor and Description |
|---|
Parameter() |
Parameter(EnumSet<Modifier> modifiers,
Type<?> elementType,
VariableDeclaratorId identifier) |
Parameter(Range range,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type<?> elementType,
NodeList<ArrayBracketPair> arrayBracketPairsAfterElementType,
boolean isVarArgs,
VariableDeclaratorId identifier) |
Parameter(Type<?> elementType,
String name)
Creates a new
Parameter. |
Parameter(Type<?> elementType,
VariableDeclaratorId identifier) |
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
NodeList<AnnotationExpr> |
getAnnotations() |
NodeList<ArrayBracketPair> |
getArrayBracketPairsAfterElementType()
Deprecated.
will be removed in 3.0
|
Type |
getElementType()
Deprecated.
will be removed in 3.0
|
VariableDeclaratorId |
getIdentifier() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this parameter declaration.
|
SimpleName |
getName() |
List<NodeList<?>> |
getNodeLists()
The list of NodeLists owned by this node.
|
Type<?> |
getType()
Gets the type
|
boolean |
isVarArgs() |
Parameter |
setAnnotations(NodeList<AnnotationExpr> annotations) |
Parameter |
setArrayBracketPairsAfterElementType(NodeList<ArrayBracketPair> arrayBracketPairsAfterType)
Deprecated.
will be removed in 3.0
|
Parameter |
setElementType(Type<?> elementType)
Deprecated.
will be removed in 3.0
|
Parameter |
setIdentifier(VariableDeclaratorId identifier) |
Parameter |
setModifiers(EnumSet<Modifier> modifiers) |
Parameter |
setName(SimpleName name) |
Parameter |
setType(Type<?> type)
Sets the type
|
Parameter |
setVarArgs(boolean isVarArgs) |
addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setRange, toString, toString, tryAddImportToParentCompilationUnit, unregisterfinalize, getClass, notify, notifyAll, wait, wait, waitsetType, setTypesetElementType, setElementTypeaddAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresentgetNameAsString, setNameaddModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatilegetIdentifierAsString, setIdentifiergetAncestorOfType, setAsParentNodeOf, setAsParentNodeOfpublic Parameter()
public Parameter(Type<?> elementType, VariableDeclaratorId identifier)
public Parameter(Type<?> elementType, String name)
Parameter.elementType - type of the parametername - name of the parameterpublic Parameter(EnumSet<Modifier> modifiers, Type<?> elementType, VariableDeclaratorId identifier)
public Parameter(Range range, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type<?> elementType, NodeList<ArrayBracketPair> arrayBracketPairsAfterElementType, boolean isVarArgs, VariableDeclaratorId identifier)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitableaccept in interface VisitableR - the type of the return value of the visitorA - the type the user argument passed to the visitorv - the visitor implementationarg - the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitablepublic Type<?> getType()
NodeWithTypegetType in interface NodeWithType<Parameter,Type<?>>public boolean isVarArgs()
public Parameter setType(Type<?> type)
NodeWithTypesetType in interface NodeWithType<Parameter,Type<?>>type - the typepublic Parameter setVarArgs(boolean isVarArgs)
public NodeList<AnnotationExpr> getAnnotations()
getAnnotations in interface NodeWithAnnotations<Parameter>public VariableDeclaratorId getIdentifier()
getIdentifier in interface NodeWithVariableDeclaratorId<Parameter>public SimpleName getName()
getName in interface NodeWithSimpleName<Parameter>public Parameter setName(SimpleName name)
setName in interface NodeWithSimpleName<Parameter>public EnumSet<Modifier> getModifiers()
getModifiers in interface NodeWithModifiers<Parameter>Modifierpublic Parameter setAnnotations(NodeList<AnnotationExpr> annotations)
setAnnotations in interface NodeWithAnnotations<Parameter>annotations - a null value is currently treated as an empty list. This behavior could change in the future,
so please avoid passing nullpublic Parameter setIdentifier(VariableDeclaratorId identifier)
setIdentifier in interface NodeWithVariableDeclaratorId<Parameter>public Parameter setModifiers(EnumSet<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<Parameter>@Deprecated public Type getElementType()
getElementType in interface NodeWithElementType<Parameter>@Deprecated public Parameter setElementType(Type<?> elementType)
setElementType in interface NodeWithElementType<Parameter>elementType - the element elementType@Deprecated public NodeList<ArrayBracketPair> getArrayBracketPairsAfterElementType()
getArrayBracketPairsAfterElementType in interface NodeWithElementType<Parameter>@Deprecated public Parameter setArrayBracketPairsAfterElementType(NodeList<ArrayBracketPair> arrayBracketPairsAfterType)
setArrayBracketPairsAfterElementType in interface NodeWithElementType<Parameter>public List<NodeList<?>> getNodeLists()
NodegetNodeLists in class NodeCopyright © 2007–2016. All rights reserved.