edu.rice.cs.dynamicjava.symbol
Class LocalVariable
java.lang.Object
edu.rice.cs.dynamicjava.symbol.LocalVariable
- All Implemented Interfaces:
- Variable
public class LocalVariable
- extends Object
- implements Variable
Represents a local variable declaration. To allow usage as a key in maps, every instance is
considered unique, and clients should not create multiple instances to describe the same entity.
|
Constructor Summary |
LocalVariable(String name,
Type type,
boolean isFinal)
Create a local variable with the given name, type, and "final" modifier. |
LocalVariable
public LocalVariable(String name,
Type type,
boolean isFinal)
- Create a local variable with the given name, type, and "final" modifier. Until sophisticated
control-flow analysis is implemented, variables that are declared final but uninitialized
should be considered non-final.
declaredName
public String declaredName()
- Specified by:
declaredName in interface Variable
type
public Type type()
- Specified by:
type in interface Variable
isFinal
public boolean isFinal()
- Specified by:
isFinal in interface Variable
toString
public String toString()
- Overrides:
toString in class Object