public final class VariableDeclarationExpr extends Expression implements NodeWithType<VariableDeclarationExpr>, NodeWithModifiers<VariableDeclarationExpr>, NodeWithAnnotations<VariableDeclarationExpr>
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE
Constructor and Description |
---|
VariableDeclarationExpr() |
VariableDeclarationExpr(EnumSet<Modifier> modifiers,
Type type,
List<VariableDeclarator> vars) |
VariableDeclarationExpr(Range range,
EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations,
Type type,
List<VariableDeclarator> vars) |
VariableDeclarationExpr(Type type,
List<VariableDeclarator> vars) |
VariableDeclarationExpr(Type type,
String variableName) |
VariableDeclarationExpr(Type type,
String variableName,
Modifier... modifiers) |
VariableDeclarationExpr(Type type,
VariableDeclarator var) |
VariableDeclarationExpr(Type type,
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() |
EnumSet<Modifier> |
getModifiers()
Return the modifiers of this variable declaration.
|
Type |
getType()
Gets the type
|
List<VariableDeclarator> |
getVars() |
VariableDeclarationExpr |
setAnnotations(List<AnnotationExpr> annotations) |
VariableDeclarationExpr |
setModifiers(EnumSet<Modifier> modifiers) |
VariableDeclarationExpr |
setType(Type type)
Sets the type
|
void |
setVars(List<VariableDeclarator> vars) |
addOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getChildrenNodes, getComment, getData, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setData, setEnd, setLineComment, setParentNode, setRange, toString, toStringWithoutComments, tryAddImportToParentCompilationUnit
finalize, getClass, notify, notifyAll, wait, wait, wait
setType
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 type, VariableDeclarator var)
public VariableDeclarationExpr(Type type, String variableName, Modifier... modifiers)
public VariableDeclarationExpr(Type type, VariableDeclarator var, Modifier... modifiers)
public VariableDeclarationExpr(Type type, List<VariableDeclarator> vars)
public VariableDeclarationExpr(EnumSet<Modifier> modifiers, Type type, List<VariableDeclarator> vars)
public VariableDeclarationExpr(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, Type type, List<VariableDeclarator> vars)
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 getType()
NodeWithType
getType
in interface NodeWithType<VariableDeclarationExpr>
public List<VariableDeclarator> getVars()
public VariableDeclarationExpr setAnnotations(List<AnnotationExpr> annotations)
setAnnotations
in interface NodeWithAnnotations<VariableDeclarationExpr>
public VariableDeclarationExpr setModifiers(EnumSet<Modifier> modifiers)
setModifiers
in interface NodeWithModifiers<VariableDeclarationExpr>
public VariableDeclarationExpr setType(Type type)
NodeWithType
setType
in interface NodeWithType<VariableDeclarationExpr>
type
- the typepublic void setVars(List<VariableDeclarator> vars)
Copyright © 2007–2016. All rights reserved.