|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
oracle.javatools.parser.java.v2.common.AbstractElement
oracle.javatools.parser.java.v2.common.AbstractVariable
public abstract class AbstractVariable
An abstract implementation of JavaVariable. If you want to implement JavaField, you should extend JavaField instead. This class is provided primarily for custom implementations of JavaLocalVariable. Check QuickLocalVariable before you extend AbstractVariable. It may already contain what you need.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface oracle.javatools.parser.java.v2.JavaPreferences |
|---|
JavaPreferences.MemberOrder |
| Field Summary |
|---|
| Fields inherited from interface oracle.javatools.parser.java.v2.model.JavaVariable |
|---|
EMPTY_ARRAY |
| Fields inherited from interface oracle.javatools.parser.java.v2.JavaOperators |
|---|
OPT_ADD, OPT_ADDASG, OPT_AND, OPT_ANNOTATION, OPT_ARRAYCONST, OPT_ASG, OPT_base, OPT_BITAND, OPT_BITANDASG, OPT_BITNOT, OPT_BITOR, OPT_BITORASG, OPT_BITXOR, OPT_BITXORASG, OPT_CLASS_LITERAL, OPT_COND, OPT_DEREF, OPT_DIV, OPT_DIVASG, OPT_DOT, OPT_EQ, OPT_GE, OPT_GT, OPT_INSTANCEOF, OPT_invalid, OPT_INVOKE, OPT_LE, OPT_LIST, OPT_LITERAL, OPT_LSH, OPT_LSHASG, OPT_LT, OPT_max, OPT_MINUS, OPT_MINUSASG, OPT_MOD, OPT_MODASG, OPT_MUL, OPT_MULASG, OPT_NEGATIVE, OPT_NESTEXP, OPT_NEWARRAY, OPT_NEWOBJECT, OPT_NOT, OPT_NOTEQ, OPT_OR, OPT_POSITIVE, OPT_POSTDEC, OPT_POSTINC, OPT_precedence, OPT_PREDEC, OPT_PREINC, OPT_QUALIFIED_SUPER, OPT_QUALIFIED_THIS, OPT_RSH, OPT_RSHASG, OPT_SIMPLE_NAME, OPT_tokens, OPT_TYPE, OPT_TYPECAST, OPT_URSH, OPT_URSHASG, OPT_words |
| Constructor Summary | |
|---|---|
AbstractVariable() |
|
| Method Summary | |
|---|---|
java.lang.Object |
getConstantValue()TODO: What about static final fields of enum type? |
abstract int |
getElementKind() |
abstract int |
getModifiers() |
abstract java.lang.String |
getName() |
JavaElement |
getOwner()TODO: Document me! |
abstract JavaType |
getResolvedType()A JavaField instance will return the field's type. |
java.lang.String |
printCompiledInfo()Debugging function for printing out compiled information. |
| Methods inherited from class oracle.javatools.parser.java.v2.common.AbstractElement |
|---|
clearCompiledInfo, getActualTypeArguments, getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, getSourceElement, getSourceSymbol, getTypeParameters, getUnresolvedType, hasActualTypeArguments, hasTypeParameters, isAbstract, isDeprecated, isFinal, isHidden, isPackagePrivate, isPrivate, isProtected, isPublic, isSourceElement, isStatic, isSynthetic, isTransient, isVarargs |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaVariable |
|---|
isVarargs |
| Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType |
|---|
getUnresolvedType |
| Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasAnnotations |
|---|
getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations |
| Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement |
|---|
getFile, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic |
| Constructor Detail |
|---|
public AbstractVariable()
| Method Detail |
|---|
public abstract int getModifiers()
getModifiers in interface JavaElementgetModifiers in class AbstractElementpublic abstract java.lang.String getName()
getName in interface JavaHasNamepublic abstract JavaType getResolvedType()
JavaHasTypeA JavaMethod instance will return the method's return type.
A JavaVariable instance will return the variable's type.
A JavaType instance will return itself.
getResolvedType in interface JavaHasTypepublic abstract int getElementKind()
getElementKind in interface JavaElementgetElementKind in class AbstractElementpublic JavaElement getOwner()
JavaElementgetOwner in interface JavaElementgetOwner in class AbstractElementpublic java.lang.Object getConstantValue()
JavaVariablegetConstantValue in interface JavaVariableNote: Constant values cannot be null. Therefore, null indicates no constant value.
If the constant value is of primitive type, it will be wrapped in an object. For example, if the constant value is an int of value 1, then an Integer i such that i.intValue() == 1 will be returned.
If the constant value is of String type, a String of same value will be returned.
If the constant value is an array, then an array of Object[] will be returned. If the constant value is an int array with single element one, then an Object[ 1 ] with single entry Integer i such that i.intValue() == 1 will be returned.
If the constant value is an enum constant, the enum constant itself is NOT returned because of practical considerations regarding classloading. Instead, a JavaField corresponding to that enum constant is returned. Notice that if "this" is an enum constant, then "this" is returned because it itself represents the enum constant.
If the constant value is a class literal, then a JavaType corresponding to the class is returned. This cannot be a JavaClass because some class literals are array types.
public java.lang.String printCompiledInfo()
JavaElementprintCompiledInfo in interface JavaElementprintCompiledInfo in class AbstractElement
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.0) E52944-01 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||