public final class Parameter extends Node implements NodeWithType<Parameter,Type>, NodeWithAnnotations<Parameter>, NodeWithSimpleName<Parameter>, NodeWithFinalModifier<Parameter>
int abc(String x, float
y) {...}
Node.ObserverRegistrationMode, Node.Parsedness
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY
Constructor and Description |
---|
Parameter() |
Parameter(EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name) |
Parameter(EnumSet<Modifier> modifiers,
Type type,
SimpleName name) |
Parameter(TokenRange tokenRange,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name)
This constructor is used by the parser and is considered private.
|
Parameter(Type type,
SimpleName name) |
Parameter(Type type,
String name)
Creates a new
Parameter . |
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.
|
Parameter |
clone() |
NodeList<AnnotationExpr> |
getAnnotations() |
ParameterMetaModel |
getMetaModel() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this parameter declaration.
|
SimpleName |
getName() |
Type |
getType()
Gets the type
|
NodeList<AnnotationExpr> |
getVarArgsAnnotations() |
boolean |
isVarArgs() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
Parameter |
setAnnotations(NodeList<AnnotationExpr> annotations) |
Parameter |
setModifiers(EnumSet<Modifier> modifiers) |
Parameter |
setName(SimpleName name) |
Parameter |
setType(Type type)
Sets the type
|
Parameter |
setVarArgs(boolean isVarArgs) |
Parameter |
setVarArgsAnnotations(NodeList<AnnotationExpr> varArgsAnnotations) |
addOrphanComment, containsData, customInitialization, equals, findCompilationUnit, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, hasComment, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, toString, toString, tryAddImportToParentCompilationUnit, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
setType, setType, tryAddImportToParentCompilationUnit
addAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnit
getNameAsString, setName
isFinal, setFinal
addModifier, removeModifier, setModifier
getAncestorOfType
containsWithin, getBegin, getEnd, isPositionedAfter, isPositionedBefore
public Parameter()
public Parameter(Type type, SimpleName name)
public Parameter(Type type, String name)
Parameter
.type
- type of the parametername
- name of the parameterpublic Parameter(EnumSet<Modifier> modifiers, Type type, SimpleName name)
public Parameter(EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, boolean isVarArgs, NodeList<AnnotationExpr> varArgsAnnotations, SimpleName name)
@Generated(value="com.github.javaparser.generator.core.node.MainConstructorGenerator") public Parameter(TokenRange tokenRange, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, boolean isVarArgs, NodeList<AnnotationExpr> varArgsAnnotations, SimpleName name)
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
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Type getType()
NodeWithType
getType
in interface NodeWithType<Parameter,Type>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public boolean isVarArgs()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Parameter setType(Type type)
NodeWithType
setType
in interface NodeWithType<Parameter,Type>
type
- the type@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Parameter setVarArgs(boolean isVarArgs)
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<AnnotationExpr> getAnnotations()
getAnnotations
in interface NodeWithAnnotations<Parameter>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public SimpleName getName()
getName
in interface NodeWithSimpleName<Parameter>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<Parameter>
Modifier
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") 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 null@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Parameter setName(SimpleName name)
setName
in interface NodeWithSimpleName<Parameter>
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Parameter setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<Parameter>
@Generated(value="com.github.javaparser.generator.core.node.RemoveMethodGenerator") public boolean remove(Node node)
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public NodeList<AnnotationExpr> getVarArgsAnnotations()
@Generated(value="com.github.javaparser.generator.core.node.PropertyGenerator") public Parameter setVarArgsAnnotations(NodeList<AnnotationExpr> varArgsAnnotations)
@Generated(value="com.github.javaparser.generator.core.node.CloneGenerator") public Parameter clone()
@Generated(value="com.github.javaparser.generator.core.node.GetMetaModelGenerator") public ParameterMetaModel getMetaModel()
getMetaModel
in class Node
Copyright © 2007–2017. All rights reserved.