public final class CodeVariableElement extends CodeElement<Element> implements VariableElement
| Constructor and Description |
|---|
CodeVariableElement(Set<Modifier> modifiers,
TypeMirror type,
String name) |
CodeVariableElement(Set<Modifier> modifiers,
TypeMirror type,
String name,
String init) |
CodeVariableElement(TypeMirror type,
String name) |
| Modifier and Type | Method and Description |
|---|---|
<R,P> R |
accept(ElementVisitor<R,P> v,
P p) |
TypeMirror |
asType() |
static CodeVariableElement |
clone(VariableElement var) |
CodeTreeBuilder |
createInitBuilder() |
Object |
getConstantValue() |
CodeTree |
getInit() |
ElementKind |
getKind() |
String |
getName() |
Name |
getSimpleName() |
TypeMirror |
getType() |
void |
setConstantValue(Object constantValue) |
void |
setInit(CodeTree init) |
void |
setName(String name) |
void |
setSimpleName(Name name) |
void |
setType(TypeMirror type) |
String |
toString() |
add, addAnnotationMirror, addOptional, getAnnotation, getAnnotationMirrors, getAnnotations, getAnnotationsByType, getEnclosedElements, getEnclosingClass, getEnclosingElement, getGeneratorAnnotationMirror, getGeneratorElement, getModifiers, remove, setEnclosingElement, setGeneratorAnnotationMirror, setGeneratorElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetEnclosingElementequals, getAnnotation, getAnnotationMirrors, getEnclosedElements, getModifiers, hashCodegetAnnotationsByTypepublic CodeVariableElement(TypeMirror type, String name)
public CodeVariableElement(Set<Modifier> modifiers, TypeMirror type, String name)
public CodeVariableElement(Set<Modifier> modifiers, TypeMirror type, String name, String init)
public CodeTreeBuilder createInitBuilder()
public void setInit(CodeTree init)
public CodeTree getInit()
public Name getSimpleName()
getSimpleName in interface ElementgetSimpleName in interface VariableElementpublic TypeMirror getType()
public TypeMirror asType()
public String toString()
toString in class CodeElement<Element>public ElementKind getKind()
public void setConstantValue(Object constantValue)
public Object getConstantValue()
getConstantValue in interface VariableElementpublic String getName()
public void setSimpleName(Name name)
public void setName(String name)
public void setType(TypeMirror type)
public <R,P> R accept(ElementVisitor<R,P> v, P p)
public static CodeVariableElement clone(VariableElement var)