public class Parameter extends Node implements NodeWithType<Parameter,Type>, NodeWithAnnotations<Parameter>, NodeWithSimpleName<Parameter>, NodeWithFinalModifier<Parameter>, Resolvable<ResolvedParameterDeclaration>
int abc(String x, float
y) {...}
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, SYMBOL_RESOLVER_KEY| Constructor and Description |
|---|
Parameter() |
Parameter(NodeList<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
Type type,
boolean isVarArgs,
NodeList<AnnotationExpr> varArgsAnnotations,
SimpleName name) |
Parameter(NodeList<Modifier> modifiers,
Type type,
SimpleName name) |
Parameter(TokenRange tokenRange,
NodeList<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() |
NodeList<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) |
ResolvedParameterDeclaration |
resolve() |
Parameter |
setAnnotations(NodeList<AnnotationExpr> annotations) |
Parameter |
setModifiers(NodeList<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, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, getToStringPrettyPrinterConfiguration, hashCode, isAncestorOf, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, setToStringPrettyPrinterConfiguration, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walkfinalize, getClass, notify, notifyAll, wait, wait, waitgetTypeAsString, setType, setType, tryAddImportToParentCompilationUnitaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitgetNameAsExpression, getNameAsString, setNameisFinal, setFinaladdModifier, getAccessSpecifier, hasModifier, removeModifier, setModifier, setModifiersfindAncestor, findAncestor, isDescendantOfcontainsWithin, containsWithinRange, getBegin, getEndpublic Parameter()
public Parameter(Type type, SimpleName name)
public Parameter(Type type, String name)
Parameter.type - type of the parametername - name of the parameterpublic Parameter(NodeList<Modifier> modifiers, Type type, SimpleName name)
public Parameter(NodeList<Modifier> modifiers, NodeList<AnnotationExpr> annotations, Type type, boolean isVarArgs, NodeList<AnnotationExpr> varArgsAnnotations, SimpleName name)
public Parameter(TokenRange tokenRange, NodeList<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)
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 SimpleName getName()
getName in interface NodeWithSimpleName<Parameter>public NodeList<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 setName(SimpleName name)
setName in interface NodeWithSimpleName<Parameter>public Parameter setModifiers(NodeList<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<Parameter>public NodeList<AnnotationExpr> getVarArgsAnnotations()
public Parameter setVarArgsAnnotations(NodeList<AnnotationExpr> varArgsAnnotations)
public ParameterMetaModel getMetaModel()
getMetaModel in class Nodepublic ResolvedParameterDeclaration resolve()
resolve in interface Resolvable<ResolvedParameterDeclaration>Copyright © 2007–2020. All rights reserved.