public final class Parameter extends Node implements NodeWithType<Parameter>, NodeWithAnnotations<Parameter>, NodeWithName<Parameter>, NodeWithModifiers<Parameter>
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE
Constructor and Description |
---|
Parameter() |
Parameter(EnumSet<Modifier> modifiers,
Type type,
VariableDeclaratorId id) |
Parameter(Range range,
EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
VariableDeclaratorId id) |
Parameter(Type type,
VariableDeclaratorId id) |
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.
|
static Parameter |
create(Type type,
String name)
Creates a new
Parameter . |
List<AnnotationExpr> |
getAnnotations() |
VariableDeclaratorId |
getId() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this parameter declaration.
|
String |
getName() |
Type |
getType()
Gets the type
|
boolean |
isVarArgs() |
Parameter |
setAnnotations(List<AnnotationExpr> annotations) |
void |
setId(VariableDeclaratorId id) |
Parameter |
setModifiers(EnumSet<Modifier> modifiers) |
Parameter |
setName(String name) |
Parameter |
setType(Type type)
Sets the type
|
void |
setVarArgs(boolean isVarArgs) |
addOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getChildrenNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setData, setEnd, setLineComment, setParentNode, setRange, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
finalize, getClass, notify, notifyAll, wait, wait, wait
setType
addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent
addModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
public Parameter()
public Parameter(Type type, VariableDeclaratorId id)
public Parameter(EnumSet<Modifier> modifiers, Type type, VariableDeclaratorId id)
public Parameter(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type, boolean isVarArgs, VariableDeclaratorId id)
public static Parameter create(Type type, String name)
Parameter
.type
- type of the parametername
- name of the parameterParameter
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
public <A> void accept(VoidVisitor<A> v, A arg)
Node
public Type getType()
NodeWithType
getType
in interface NodeWithType<Parameter>
public boolean isVarArgs()
public Parameter setType(Type type)
NodeWithType
setType
in interface NodeWithType<Parameter>
type
- the typepublic void setVarArgs(boolean isVarArgs)
public List<AnnotationExpr> getAnnotations()
getAnnotations
in interface NodeWithAnnotations<Parameter>
public VariableDeclaratorId getId()
public String getName()
getName
in interface NodeWithName<Parameter>
public Parameter setName(String name)
setName
in interface NodeWithName<Parameter>
public EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<Parameter>
Modifier
public Parameter setAnnotations(List<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 void setId(VariableDeclaratorId id)
public Parameter setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<Parameter>
Copyright © 2007–2016. All rights reserved.