public final class Parameter extends Node implements NodeWithType<Parameter,Type<?>>, NodeWithElementType<Parameter>, NodeWithAnnotations<Parameter>, NodeWithSimpleName<Parameter>, NodeWithModifiers<Parameter>
Node.ObserverRegistrationMode
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
Parameter() |
Parameter(EnumSet<Modifier> modifiers,
Type<?> elementType,
VariableDeclaratorId id) |
Parameter(Range range,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type<?> elementType,
NodeList<ArrayBracketPair> arrayBracketPairsAfterElementType,
boolean isVarArgs,
VariableDeclaratorId id) |
Parameter(Type<?> elementType,
String name)
Creates a new
Parameter . |
Parameter(Type<?> elementType,
VariableDeclaratorId id) |
addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getRange, getUserData, hasComment, hashCode, isPositionedAfter, isPositionedBefore, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
setType, setType
setElementType, setElementType
addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent
getNameAsString, setName
addModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
getAncestorOfType, setAsParentNodeOf, setAsParentNodeOf
public Parameter()
public Parameter(Type<?> elementType, VariableDeclaratorId id)
public Parameter(Type<?> elementType, String name)
Parameter
.elementType
- type of the parametername
- name of the parameterpublic Parameter(EnumSet<Modifier> modifiers, Type<?> elementType, VariableDeclaratorId id)
public Parameter(Range range, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type<?> elementType, NodeList<ArrayBracketPair> arrayBracketPairsAfterElementType, boolean isVarArgs, VariableDeclaratorId id)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- 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)
Visitable
public Type<?> getType()
NodeWithType
getType
in interface NodeWithType<Parameter,Type<?>>
public boolean isVarArgs()
public Parameter setType(Type<?> type)
NodeWithType
setType
in interface NodeWithType<Parameter,Type<?>>
type
- the typepublic Parameter setVarArgs(boolean isVarArgs)
public NodeList<AnnotationExpr> getAnnotations()
getAnnotations
in interface NodeWithAnnotations<Parameter>
public VariableDeclaratorId getId()
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>
Modifier
public 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 void setId(VariableDeclaratorId id)
public Parameter setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<Parameter>
public Type getElementType()
getElementType
in interface NodeWithElementType<Parameter>
public Parameter setElementType(Type<?> elementType)
setElementType
in interface NodeWithElementType<Parameter>
elementType
- the element elementTypepublic NodeList<ArrayBracketPair> getArrayBracketPairsAfterElementType()
getArrayBracketPairsAfterElementType
in interface NodeWithElementType<Parameter>
public Parameter setArrayBracketPairsAfterElementType(NodeList<ArrayBracketPair> arrayBracketPairsAfterType)
setArrayBracketPairsAfterElementType
in interface NodeWithElementType<Parameter>
public List<NodeList<?>> getNodeLists()
Node
getNodeLists
in class Node
Copyright © 2007–2016. All rights reserved.