edu.rice.cs.dynamicjava.symbol
Class LocalVariable

java.lang.Object
  extended by 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.
 
Method Summary
 String declaredName()
           
 boolean isFinal()
           
 String toString()
           
 Type type()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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.

Method Detail

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