dk.brics.string.intermediate
Class Field

java.lang.Object
  extended by dk.brics.string.intermediate.Field

public class Field
extends Object

A field in the intermediate representation. Each field is represented by an intermediate variable.

A field's variable must never be used directly in any statement except FieldAssignment and FieldReference. To assign from one field to another, the first field must be copied into a local variable with a FieldReference and then into the other field with a FieldAssignment.


Method Summary
 Set<FieldAssignment> getFieldAssignments()
          Returns the (unmodifiable) set of assignments to this field.
 Set<FieldReference> getFieldReferences()
          Returns the (unmodifiable) set of references to this field.
 Variable getVariable()
          Returns the field's variable, which holds all the possible values of the field at any time.
 boolean isStatic()
          Returns true if this is a static field.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getFieldAssignments

public Set<FieldAssignment> getFieldAssignments()
Returns the (unmodifiable) set of assignments to this field.

Returns:
an umodifiable set backed by the field object.

getFieldReferences

public Set<FieldReference> getFieldReferences()
Returns the (unmodifiable) set of references to this field.

Returns:
an umodifiable set backed by the field object.

getVariable

public Variable getVariable()
Returns the field's variable, which holds all the possible values of the field at any time.

Returns:
a variable

isStatic

public boolean isStatic()
Returns true if this is a static field.


toString

public String toString()
Overrides:
toString in class Object


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