Package org.openl.vm
Class SimpleVM.SimpleRuntimeEnv
- java.lang.Object
-
- org.openl.vm.SimpleVM.SimpleRuntimeEnv
-
- All Implemented Interfaces:
IRuntimeEnv
- Enclosing class:
- SimpleVM
public static class SimpleVM.SimpleRuntimeEnv extends Object implements IRuntimeEnv
-
-
Field Summary
Fields Modifier and Type Field Description protected ArrayDeque<IRuntimeContext>
contextStack
protected ArrayDeque<Object[]>
frameStack
protected ArrayDeque<Object>
thisStack
-
Constructor Summary
Constructors Constructor Description SimpleRuntimeEnv()
SimpleRuntimeEnv(SimpleVM.SimpleRuntimeEnv env)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected IRuntimeContext
buildDefaultRuntimeContext()
IRuntimeEnv
clone()
IRuntimeContext
getContext()
Gets the runtime context.Object[]
getLocalFrame()
IOpenRunner
getRunner()
Object
getThis()
boolean
isContextManagingSupported()
IRuntimeContext
popContext()
Object[]
popLocalFrame()
Object
popThis()
void
pushContext(IRuntimeContext context)
void
pushLocalFrame(Object[] frame)
void
pushThis(Object thisObject)
void
setContext(IRuntimeContext context)
Sets context to runtime environment.
-
-
-
Field Detail
-
thisStack
protected final ArrayDeque<Object> thisStack
-
frameStack
protected final ArrayDeque<Object[]> frameStack
-
contextStack
protected ArrayDeque<IRuntimeContext> contextStack
-
-
Constructor Detail
-
SimpleRuntimeEnv
public SimpleRuntimeEnv()
-
SimpleRuntimeEnv
public SimpleRuntimeEnv(SimpleVM.SimpleRuntimeEnv env)
-
-
Method Detail
-
buildDefaultRuntimeContext
protected IRuntimeContext buildDefaultRuntimeContext()
-
getLocalFrame
public Object[] getLocalFrame()
- Specified by:
getLocalFrame
in interfaceIRuntimeEnv
-
getRunner
public IOpenRunner getRunner()
- Specified by:
getRunner
in interfaceIRuntimeEnv
-
getThis
public Object getThis()
- Specified by:
getThis
in interfaceIRuntimeEnv
-
popLocalFrame
public Object[] popLocalFrame()
- Specified by:
popLocalFrame
in interfaceIRuntimeEnv
-
popThis
public Object popThis()
- Specified by:
popThis
in interfaceIRuntimeEnv
-
pushLocalFrame
public void pushLocalFrame(Object[] frame)
- Specified by:
pushLocalFrame
in interfaceIRuntimeEnv
-
pushThis
public void pushThis(Object thisObject)
- Specified by:
pushThis
in interfaceIRuntimeEnv
-
getContext
public IRuntimeContext getContext()
Description copied from interface:IRuntimeEnv
Gets the runtime context.- Specified by:
getContext
in interfaceIRuntimeEnv
- Returns:
IContext
instance
-
setContext
public void setContext(IRuntimeContext context)
Description copied from interface:IRuntimeEnv
Sets context to runtime environment. By default, runtime environment does not provide any context.- Specified by:
setContext
in interfaceIRuntimeEnv
- Parameters:
context
- runtime context.
-
popContext
public IRuntimeContext popContext()
- Specified by:
popContext
in interfaceIRuntimeEnv
-
pushContext
public void pushContext(IRuntimeContext context)
- Specified by:
pushContext
in interfaceIRuntimeEnv
-
isContextManagingSupported
public boolean isContextManagingSupported()
- Specified by:
isContextManagingSupported
in interfaceIRuntimeEnv
-
clone
public IRuntimeEnv clone()
-
-