This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.lang.model.element
interface VariableElement
- All Superinterfaces:
- Element
public interface VariableElement
extends Element
Represents a field, {@code enum} constant, method or constructor
parameter, local variable, or exception parameter.
Method Summary |
Object |
Returns the value of this variable if this is a
field initialized to a compile-time constant.
|
Methods inherited from class javax.lang.model.element.Element |
accept, asType, equals, getAnnotation, getAnnotationMirrors, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, hashCode |
getConstantValue
public Object getConstantValue()
-
Returns the value of this variable if this is a {@code final}
field initialized to a compile-time constant. Returns {@code
null} otherwise. The value will be of a primitive type or a
{@code String}. If the value is of a primitive type, it is
wrapped in the appropriate wrapper class (such as {@link
Integer}).
Note that not all {@code final} fields will have
constant values. In particular, {@code 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 {@code String}.
- Returns:
- the value of this variable if this is a {@code final}
field initialized to a compile-time constant, or {@code null}
otherwise
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.