polyglot.types
Interface VarInstance

All Superinterfaces:
java.lang.Cloneable, Copy, java.io.Serializable, TypeObject
All Known Subinterfaces:
FieldInstance, LocalInstance
All Known Implementing Classes:
FieldInstance_c, LocalInstance_c, VarInstance_c

public interface VarInstance
extends TypeObject

A VarInstance contains type information for a variable. It may be either a local or a field.


Method Summary
 java.lang.Object constantValue()
          The variable's constant value, or null.
 Flags flags()
          The flags of the variable.
 boolean isConstant()
          Whether the variable has a constant value.
 java.lang.String name()
          The name of the variable.
 void setFlags(Flags flags)
          Destructively set the flags of the variable.
 void setType(Type type)
          Destructively set the type of the variable.
 Type type()
          The type of the variable.
 
Methods inherited from interface polyglot.types.TypeObject
equalsImpl, isCanonical, position, typeSystem
 
Methods inherited from interface polyglot.util.Copy
copy
 

Method Detail

flags

Flags flags()
The flags of the variable.


name

java.lang.String name()
The name of the variable.


type

Type type()
The type of the variable.


constantValue

java.lang.Object constantValue()
The variable's constant value, or null.


isConstant

boolean isConstant()
Whether the variable has a constant value.


setType

void setType(Type type)
Destructively set the type of the variable. This method should be deprecated.


setFlags

void setFlags(Flags flags)
Destructively set the flags of the variable.