public final class VariableDeclarationExpr extends Expression implements NodeWithElementType<VariableDeclarationExpr>, NodeWithModifiers<VariableDeclarationExpr>, NodeWithAnnotations<VariableDeclarationExpr>, NodeWithVariables<VariableDeclarationExpr>
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION
Constructor and Description |
---|
VariableDeclarationExpr() |
VariableDeclarationExpr(EnumSet<Modifier> modifiers,
Type elementType,
List<VariableDeclarator> variables) |
VariableDeclarationExpr(Range range,
EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations,
Type elementType,
List<VariableDeclarator> variables,
List<ArrayBracketPair> arrayBracketPairsAfterType) |
VariableDeclarationExpr(Type elementType,
List<VariableDeclarator> variables) |
VariableDeclarationExpr(Type elementType,
String variableName) |
VariableDeclarationExpr(Type elementType,
String variableName,
Modifier... modifiers) |
VariableDeclarationExpr(Type elementType,
VariableDeclarator var) |
VariableDeclarationExpr(Type elementType,
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.
|
static VariableDeclarationExpr |
create(Type type,
String name)
Creates a
VariableDeclarationExpr . |
List<AnnotationExpr> |
getAnnotations() |
List<ArrayBracketPair> |
getArrayBracketPairsAfterElementType() |
Type |
getElementType() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this variable declaration.
|
List<VariableDeclarator> |
getVariables() |
VariableDeclarationExpr |
setAnnotations(List<AnnotationExpr> annotations) |
VariableDeclarationExpr |
setArrayBracketPairsAfterElementType(List<ArrayBracketPair> arrayBracketPairsAfterType) |
VariableDeclarationExpr |
setElementType(Type elementType) |
VariableDeclarationExpr |
setModifiers(EnumSet<Modifier> modifiers) |
VariableDeclarationExpr |
setVariables(List<VariableDeclarator> variables) |
addOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getChildrenNodes, getComment, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, getUserData, hasComment, hashCode, isPositionedAfter, isPositionedBefore, remove, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
finalize, getClass, notify, notifyAll, wait, wait, wait
setElementType, setElementType
addModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatile
addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent
public VariableDeclarationExpr()
public VariableDeclarationExpr(Type elementType, VariableDeclarator var)
public VariableDeclarationExpr(Type elementType, String variableName, Modifier... modifiers)
public VariableDeclarationExpr(Type elementType, VariableDeclarator var, Modifier... modifiers)
public VariableDeclarationExpr(Type elementType, List<VariableDeclarator> variables)
public VariableDeclarationExpr(EnumSet<Modifier> modifiers, Type elementType, List<VariableDeclarator> variables)
public VariableDeclarationExpr(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type elementType, List<VariableDeclarator> variables, List<ArrayBracketPair> arrayBracketPairsAfterType)
public static VariableDeclarationExpr create(Type type, String name)
VariableDeclarationExpr
.VariableDeclarationExpr
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Node
public <A> void accept(VoidVisitor<A> v, A arg)
Node
public List<AnnotationExpr> getAnnotations()
getAnnotations
in interface NodeWithAnnotations<VariableDeclarationExpr>
public EnumSet<Modifier> getModifiers()
getModifiers
in interface NodeWithModifiers<VariableDeclarationExpr>
Modifier
public Type getElementType()
getElementType
in interface NodeWithElementType<VariableDeclarationExpr>
public List<VariableDeclarator> getVariables()
getVariables
in interface NodeWithVariables<VariableDeclarationExpr>
public VariableDeclarationExpr setAnnotations(List<AnnotationExpr> annotations)
setAnnotations
in interface NodeWithAnnotations<VariableDeclarationExpr>
public VariableDeclarationExpr setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<VariableDeclarationExpr>
public VariableDeclarationExpr setElementType(Type elementType)
setElementType
in interface NodeWithElementType<VariableDeclarationExpr>
elementType
- the element elementTypepublic VariableDeclarationExpr setVariables(List<VariableDeclarator> variables)
setVariables
in interface NodeWithVariables<VariableDeclarationExpr>
public List<ArrayBracketPair> getArrayBracketPairsAfterElementType()
getArrayBracketPairsAfterElementType
in interface NodeWithElementType<VariableDeclarationExpr>
public VariableDeclarationExpr setArrayBracketPairsAfterElementType(List<ArrayBracketPair> arrayBracketPairsAfterType)
setArrayBracketPairsAfterElementType
in interface NodeWithElementType<VariableDeclarationExpr>
Copyright © 2007–2016. All rights reserved.