|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.tools.javac.code.Symbol
com.sun.tools.javac.code.Symbol.VarSymbol
public static class Symbol.VarSymbol
A class for variable symbols
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.tools.javac.code.Symbol |
|---|
Symbol.ClassSymbol, Symbol.Completer, Symbol.CompletionFailure, Symbol.DelegatedSymbol, Symbol.Level, Symbol.MethodSymbol, Symbol.OperatorSymbol, Symbol.PackageSymbol, Symbol.TypeSymbol, Symbol.VarSymbol, Symbol.Visitor<R,P> |
| Field Summary | |
|---|---|
int |
adr
The variable's address. |
private java.lang.Object |
data
The variable's constant value, if this is a constant. |
int |
pos
The variable's declaration position. |
| Fields inherited from class com.sun.tools.javac.code.Symbol |
|---|
attributes_field, completer, erasure_field, flags_field, kind, level, name, owner, type |
| Constructor Summary | |
|---|---|
Symbol.VarSymbol(long flags,
Name name,
Type type,
Symbol owner)
Construct a variable symbol, given its flags, name, type and owner. |
|
| Method Summary | ||
|---|---|---|
|
accept(ElementVisitor<R,P> v,
P p)
Applies a visitor to this element. |
|
|
accept(Symbol.Visitor<R,P> v,
P p)
|
|
Symbol |
asMemberOf(Type site,
Types types)
The (variable or method) symbol seen as a member of given class type`site' (this might change the symbol's type). |
|
Symbol.VarSymbol |
clone(Symbol newOwner)
Clone this symbol with new owner. |
|
java.lang.Object |
getConstantValue()
Returns the value of this variable if this is a final
field initialized to a compile-time constant. |
|
java.lang.Object |
getConstValue()
|
|
ElementKind |
getKind()
Returns the kind of this element. |
|
boolean |
isExceptionParameter()
|
|
void |
setData(java.lang.Object data)
|
|
void |
setLazyConstValue(Env<AttrContext> env,
Log log,
Attr attr,
JCTree.JCExpression initializer)
|
|
java.lang.String |
toString()
The Java source which this symbol represents. |
|
| Methods inherited from class com.sun.tools.javac.code.Symbol |
|---|
addParentLevel, asType, attribute, complete, enclClass, erasure, exists, externalType, flags, flatName, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getLevel, getModifiers, getQualifiedName, getSimpleName, getTypeParameters, hasOuterInstance, isConstructor, isEnclosedBy, isInheritedIn, isInner, isInterface, isLocal, isMemberOf, isStatic, isSubClass, location, location, members, outermostClass, overrides, packge, removeParentLevel |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.lang.model.element.Element |
|---|
asType, equals, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getModifiers, getSimpleName, hashCode |
| Field Detail |
|---|
public int pos
public int adr
private java.lang.Object data
| Constructor Detail |
|---|
public Symbol.VarSymbol(long flags,
Name name,
Type type,
Symbol owner)
| Method Detail |
|---|
public Symbol.VarSymbol clone(Symbol newOwner)
clone in class Symbolpublic java.lang.String toString()
Symbol
toString in class Symbol
public Symbol asMemberOf(Type site,
Types types)
Symbol
asMemberOf in class Symbolpublic ElementKind getKind()
Elementkind of this element.
getKind in interface ElementgetKind in class Symbol
public <R,P> R accept(ElementVisitor<R,P> v,
P p)
Element
accept in interface ElementR - the return type of the visitor's methodsP - the type of the additional parameter to the visitor's methodsv - the visitor operating on this elementp - additional parameter to the visitor
public java.lang.Object getConstantValue()
VariableElementfinal
field initialized to a compile-time constant. Returns null otherwise. The value will be of a primitive type or a
String. If the value is of a primitive type, it is
wrapped in the appropriate wrapper class (such as Integer).
Note that not all final fields will have
constant values. In particular, enum constants are
not considered to be compile-time constants. To have a
constant value, a field's type must be either a primitive type
or String.
getConstantValue in interface VariableElementfinal
field initialized to a compile-time constant, or null
otherwiseElements.getConstantExpression(Object)
public void setLazyConstValue(Env<AttrContext> env,
Log log,
Attr attr,
JCTree.JCExpression initializer)
public boolean isExceptionParameter()
public java.lang.Object getConstValue()
public void setData(java.lang.Object data)
public <R,P> R accept(Symbol.Visitor<R,P> v,
P p)
accept in class Symbol
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||