public final class VariableDeclarationExpr extends Expression implements NodeWithModifiers<VariableDeclarationExpr>, NodeWithAnnotations<VariableDeclarationExpr>, NodeWithVariables<VariableDeclarationExpr>
Node.ObserverRegistrationMode
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration
Constructor and Description |
---|
VariableDeclarationExpr() |
VariableDeclarationExpr(EnumSet<Modifier> modifiers,
NodeList<VariableDeclarator> variables) |
VariableDeclarationExpr(NodeList<VariableDeclarator> variables) |
VariableDeclarationExpr(Range range,
EnumSet<Modifier> modifiers,
NodeList<AnnotationExpr> annotations,
NodeList<VariableDeclarator> variables) |
VariableDeclarationExpr(Type type,
String variableName) |
VariableDeclarationExpr(Type type,
String variableName,
Modifier... modifiers) |
VariableDeclarationExpr(VariableDeclarator var) |
VariableDeclarationExpr(VariableDeclarator var,
Modifier... modifiers) |
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() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this variable declaration.
|
NodeList<VariableDeclarator> |
getVariables() |
VariableDeclarationExpr |
setAnnotations(NodeList<AnnotationExpr> annotations) |
VariableDeclarationExpr |
setModifiers(EnumSet<Modifier> modifiers) |
VariableDeclarationExpr |
setVariables(NodeList<VariableDeclarator> variables) |
addOrphanComment, clone, containsWithin, equals, getAllContainedComments, getBegin, getChildNodes, getComment, getData, getEnd, getNodeLists, 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, unregister
finalize, getClass, notify, notifyAll, wait, wait, wait
addModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent
getCommonType, getElementType, getVariable
getAncestorOfType, setAsParentNodeOf, setAsParentNodeOf
public VariableDeclarationExpr()
public VariableDeclarationExpr(VariableDeclarator var)
public VariableDeclarationExpr(Type type, String variableName, Modifier... modifiers)
public VariableDeclarationExpr(VariableDeclarator var, Modifier... modifiers)
public VariableDeclarationExpr(NodeList<VariableDeclarator> variables)
public VariableDeclarationExpr(EnumSet<Modifier> modifiers, NodeList<VariableDeclarator> variables)
public VariableDeclarationExpr(Range range, EnumSet<Modifier> modifiers, NodeList<AnnotationExpr> annotations, NodeList<VariableDeclarator> variables)
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 NodeList<AnnotationExpr> getAnnotations()
getAnnotations
in interface NodeWithAnnotations<VariableDeclarationExpr>
public EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<VariableDeclarationExpr>
Modifier
public NodeList<VariableDeclarator> getVariables()
getVariables
in interface NodeWithVariables<VariableDeclarationExpr>
public VariableDeclarationExpr setAnnotations(NodeList<AnnotationExpr> annotations)
setAnnotations
in interface NodeWithAnnotations<VariableDeclarationExpr>
public VariableDeclarationExpr setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<VariableDeclarationExpr>
public VariableDeclarationExpr setVariables(NodeList<VariableDeclarator> variables)
setVariables
in interface NodeWithVariables<VariableDeclarationExpr>
Copyright © 2007–2016. All rights reserved.