dk.brics.string.intermediate
Class Variable

java.lang.Object
  extended by dk.brics.string.intermediate.Variable
All Implemented Interfaces:
Comparable<Variable>

public final class Variable
extends Object
implements Comparable<Variable>

A variable or other intermediate value in the Java program. A variable has a type, which is either String, StringBuffer, StringBuilder, an array (of arbitrary dimension) of String, or some irrelevant type.


Method Summary
 int compareTo(Variable v)
           
 boolean equals(Object other)
           
 Field getField()
          Returns the field represented by this variable, or null if this is not a field variable.
 int getKey()
           
 VariableType getType()
           
 int hashCode()
           
 boolean isField()
          Returns false if this is a local variable, and true if it is a field variable.
 boolean isLocal()
          Returns true if this is a local variable, and false if it is a field variable.
 boolean isMutable()
          Returns true if the variable might be mutable.
 boolean isTaint()
           
 void setTaint(boolean taint)
           
 String toString()
          Returns a string representation of the variable.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

compareTo

public int compareTo(Variable v)
Specified by:
compareTo in interface Comparable<Variable>

equals

public boolean equals(Object other)
Overrides:
equals in class Object

getField

public Field getField()
Returns the field represented by this variable, or null if this is not a field variable.

Returns:
null, or a field.

getKey

public int getKey()

getType

public VariableType getType()
Returns:
the type

hashCode

public int hashCode()
Overrides:
hashCode in class Object

isField

public boolean isField()
Returns false if this is a local variable, and true if it is a field variable.


isLocal

public boolean isLocal()
Returns true if this is a local variable, and false if it is a field variable.


isMutable

public boolean isMutable()
Returns true if the variable might be mutable.


isTaint

public boolean isTaint()

setTaint

public void setTaint(boolean taint)

toString

public String toString()
Returns a string representation of the variable.

Overrides:
toString in class Object
Returns:
a unique identifier for the variable.


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.