< prev index next >
src/java.compiler/share/classes/javax/lang/model/element/VariableElement.java
Print this page
@@ -24,10 +24,11 @@
*/
package javax.lang.model.element;
import javax.lang.model.util.Elements;
+import javax.lang.model.type.TypeMirror;
/**
* Represents a field, {@code enum} constant, method or constructor
* parameter, local variable, resource variable, or exception
* parameter.
@@ -36,10 +37,16 @@
* @author Scott Seligman
* @author Peter von der Ahé
* @since 1.6
*/
public interface VariableElement extends Element {
+ /**
+ * Returns the type of this variable.
+ * @return the type of this variable
+ */
+ @Override
+ TypeMirror asType();
/**
* 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
< prev index next >