|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractMap<K,V>
java.util.HashMap<LexNameToken,Value>
org.overturetool.vdmj.runtime.Context
public class Context
A class to hold runtime name/value context information.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.util.AbstractMap |
|---|
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Field Summary | |
|---|---|
LexLocation |
location
The location of the context. |
Context |
outer
A link to a lower level context, if present. |
ThreadState |
threadState
The thread state associated with this context. |
java.lang.String |
title
The name of the location. |
| Constructor Summary | |
|---|---|
Context(LexLocation location,
java.lang.String title,
Context outer)
Create a context at the given location. |
|
| Method Summary | |
|---|---|
Value |
check(LexNameToken name)
Get the value for a given name. |
Context |
deepCopy()
|
protected java.lang.String |
format(java.lang.String indent,
Context what)
|
Value |
get(java.lang.Object name)
Get a name, taking type overloading into account. |
int |
getDepth()
|
Context |
getFrame(int depth)
|
Context |
getFreeVariables()
Get all visible names from this Context, with more visible values overriding those below. |
Context |
getGlobal()
Find the outermost context from this one. |
RootContext |
getRoot()
Find the nearest RootContext in the context chain. |
ObjectValue |
getSelf()
|
Context |
getUpdateable()
Build a new Context based on the current one, but with only the updateable values included (eg. |
Value |
lookup(LexNameToken name)
Return the value of a name, else fail. |
void |
printStackTrace(java.io.PrintWriter out,
boolean variables)
|
void |
put(NameValuePairList nvl)
Add a list of name/value pairs to this context. |
void |
setThreadState(DBGPReader dbgp,
CPUValue cpu)
Set the current thread state. |
java.lang.String |
toString()
|
| Methods inherited from class java.util.HashMap |
|---|
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
|---|
equals, hashCode |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
|---|
equals, hashCode |
| Field Detail |
|---|
public final LexLocation location
public final java.lang.String title
public final Context outer
public ThreadState threadState
| Constructor Detail |
|---|
public Context(LexLocation location,
java.lang.String title,
Context outer)
location - title - outer - | Method Detail |
|---|
public void setThreadState(DBGPReader dbgp,
CPUValue cpu)
cpu - TODOpublic Context getGlobal()
public RootContext getRoot()
public Context getUpdateable()
public Context deepCopy()
public void put(NameValuePairList nvl)
nvl - A list of name/value pairs.public Value get(java.lang.Object name)
get in interface java.util.Map<LexNameToken,Value>get in class java.util.HashMap<LexNameToken,Value>public Context getFreeVariables()
public Value check(LexNameToken name)
name - The name to look for.
public Value lookup(LexNameToken name)
ContextException is thrown.
name - The name to look for.
public java.lang.String toString()
toString in class java.util.AbstractMap<LexNameToken,Value>
protected java.lang.String format(java.lang.String indent,
Context what)
public void printStackTrace(java.io.PrintWriter out,
boolean variables)
public int getDepth()
public Context getFrame(int depth)
public ObjectValue getSelf()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||