Package ptolemy.caltrop.ddi.util
Class DataMapEnvironment
- java.lang.Object
-
- ptolemy.caltrop.ddi.util.DataMapEnvironment
-
- All Implemented Interfaces:
caltrop.interpreter.environment.Environment
public class DataMapEnvironment extends java.lang.Object implements caltrop.interpreter.environment.Environment
A read-only Environment that wraps a Map of data read from input ports.- Since:
- Ptolemy II 4.0
- Version:
- $Id$
- Author:
- Jörn W. Janneck
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DataMapEnvironment.UnboundPortVarException
-
Constructor Summary
Constructors Constructor Description DataMapEnvironment(caltrop.interpreter.ast.InputPattern[] inputPatterns, java.util.Map dataFromInputPorts, caltrop.interpreter.environment.Environment parentEnv, caltrop.interpreter.Context context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
bind(java.lang.Object variable, java.lang.Object value)
void
freezeLocal()
java.lang.Object
get(java.lang.Object variable)
java.lang.Object
get(java.lang.Object variable, java.lang.Object[] location)
boolean
isLocalVar(java.lang.Object variable)
java.util.Map
localBindings()
java.util.Set
localVars()
caltrop.interpreter.environment.Environment
newFrame()
caltrop.interpreter.environment.Environment
newFrame(caltrop.interpreter.environment.Environment parent)
void
set(java.lang.Object variable, java.lang.Object value)
void
set(java.lang.Object variable, java.lang.Object[] location, java.lang.Object value)
-
-
-
Method Detail
-
get
public java.lang.Object get(java.lang.Object variable)
- Specified by:
get
in interfacecaltrop.interpreter.environment.Environment
-
get
public java.lang.Object get(java.lang.Object variable, java.lang.Object[] location)
-
set
public void set(java.lang.Object variable, java.lang.Object value)
- Specified by:
set
in interfacecaltrop.interpreter.environment.Environment
-
set
public void set(java.lang.Object variable, java.lang.Object[] location, java.lang.Object value)
- Specified by:
set
in interfacecaltrop.interpreter.environment.Environment
-
bind
public void bind(java.lang.Object variable, java.lang.Object value)
- Specified by:
bind
in interfacecaltrop.interpreter.environment.Environment
-
localVars
public java.util.Set localVars()
- Specified by:
localVars
in interfacecaltrop.interpreter.environment.Environment
-
localBindings
public java.util.Map localBindings()
- Specified by:
localBindings
in interfacecaltrop.interpreter.environment.Environment
-
isLocalVar
public boolean isLocalVar(java.lang.Object variable)
- Specified by:
isLocalVar
in interfacecaltrop.interpreter.environment.Environment
-
newFrame
public caltrop.interpreter.environment.Environment newFrame()
- Specified by:
newFrame
in interfacecaltrop.interpreter.environment.Environment
-
newFrame
public caltrop.interpreter.environment.Environment newFrame(caltrop.interpreter.environment.Environment parent)
- Specified by:
newFrame
in interfacecaltrop.interpreter.environment.Environment
-
freezeLocal
public void freezeLocal()
- Specified by:
freezeLocal
in interfacecaltrop.interpreter.environment.Environment
-
-