enum constant, method or constructor
parameter, local variable, resource variable, or exception
parameter.
try statement, 14.20.3 try-with-resources
| Modifier and Type | Method and Description |
|---|---|
| public TypeMirror | Returns: the type of this variableRedeclares javax. Returns the type of this variable. |
| public Object | Returns: the value of this variable if this is afinal
field initialized to a compile-time constant, or null
otherwiseReturns the value of this variable if this is a |
| public Element | Returns: the enclosing element of this variableRedeclares javax. Returns the enclosing element of this variable. |
| public Name | Returns: the simple name of this variable elementRedeclares javax. Returns the simple name of this variable element. |
| public default boolean | Returns: true if this is an unnamed variable and false otherwiseReturns |
| asType | back to summary |
|---|---|
| public TypeMirror asType() Redeclares javax. Returns the type of this variable. Note that the types of variables range over many kinds of types, including primitive types, declared types, and array types, among others.
| |
| getConstantValue | back to summary |
|---|---|
| public Object getConstantValue() Returns the value of this variable if this is a Note that not all
| |
| getEnclosingElement | back to summary |
|---|---|
| public Element getEnclosingElement() Redeclares javax. Returns the enclosing element of this variable. The enclosing element of a method or constructor parameter is the executable declaring the parameter. | |
| getSimpleName | back to summary |
|---|---|
| public Name getSimpleName() Redeclares javax. Returns the simple name of this variable element. For method and constructor parameters, the name of each parameter must be distinct from the names of all other parameters of the same executable. If the original source names are not available, an implementation may synthesize names subject to the distinctness requirement above. For variables, the name of each variable is returned, or an empty name if the variable is unnamed. | |
| isUnnamed | back to summary |
|---|---|
| public default boolean isUnnamed() Returns Implementation Specification The default implementation of this method calls
| |