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() |
boolean |
equals(Object obj) |
Object |
getConstantValue() |
CodeTree |
getInit() |
ElementKind |
getKind() |
String |
getName() |
Name |
getSimpleName() |
TypeMirror |
getType() |
int |
hashCode() |
void |
setConstantValue(Object constantValue) |
void |
setInit(CodeTree init) |
void |
setName(String name) |
void |
setSimpleName(Name name) |
void |
setType(TypeMirror type) |
String |
toString() |
add, addAll, addAnnotationMirror, addOptional, getAnnotation, getAnnotationMirrors, getAnnotations, getAnnotationsByType, getEnclosedElements, getEnclosingClass, getEnclosingElement, getGeneratorAnnotationMirror, getGeneratorElement, getModifiers, remove, setEnclosingElement, setGeneratorAnnotationMirror, setGeneratorElementclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetEnclosingElementgetAnnotation, getAnnotationMirrors, getEnclosedElements, getModifiersgetAnnotationsByTypepublic 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 boolean equals(Object obj)
equals in interface Elementequals in class CodeElement<Element>public int hashCode()
hashCode in interface ElementhashCode in class CodeElement<Element>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)