frysk.rt
Class DisplayValue
java.lang.Object
frysk.rt.DisplayValue
- Direct Known Subclasses:
- UpdatingDisplayValue
class DisplayValue
- extends Object
The DisplayValue class is an intermediary between a Variable object and anything that
wishes to keep track of Variables. A Display is responsible for keeping track
of when a Variable is in or out of scope, and reloading the variable if it is
available upon a process becoming blocked. It is also responsible for keeping
track of the Variable should it switch from being in memory to being in a
register
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
varLabel
protected String varLabel
myTask
protected Task myTask
frameIdentifier
protected FrameIdentifier frameIdentifier
myVar
protected Value myVar
num
protected int num
DisplayValue
public DisplayValue(String name,
Task task,
FrameIdentifier fIdent,
int id)
- Creates a new DisplayValue object encompassing a variable from the
provided Task
- Parameters:
name
- The name of the value to encapsulatetask
- The task to fetch updates fromfIdent
- The FrameIdentifier corresponding to the frame that
the variable should be looked for in.id
- The unique identifier for this display
isAvailable
public boolean isAvailable()
- Returns:
- true iff the variable represented by this Display is in scope
refresh
public void refresh()
- Updates the display to refect the new variable value
getValue
public Value getValue()
- Returns:
- The Value object encapsulated by this Display.
getFrameIdentifier
public FrameIdentifier getFrameIdentifier()
getTask
public Task getTask()
getName
public String getName()
getId
public int getId()