Package org.openl.rules.tbasic.runtime
Class TBasicContextHolderEnv
- java.lang.Object
-
- org.openl.rules.tbasic.runtime.TBasicContextHolderEnv
-
- All Implemented Interfaces:
IRuntimeEnv
public class TBasicContextHolderEnv extends Object implements IRuntimeEnv
TheTBasicContextHolderEnvcontains full context for execution of Algorithm: runtime environment, VM, variables and parameters to run with.
-
-
Constructor Summary
Constructors Constructor Description TBasicContextHolderEnv(IRuntimeEnv env, DelegatedDynamicObject tbasicTarget, Object[] params, TBasicVM tbasicVM)Create an instance ofTBasicContextHolderEnvinitialized with environment,DelegatedDynamicObjectfor variables,execution VM and parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassignValueToVariable(String variableName, Object value)Create new variable in context(if variable with specified name does not exist) and sets its value.IRuntimeContextgetContext()IRuntimeEnvgetEnv()Object[]getLocalFrame()IOpenRunnergetRunner()Object[]getTbasicParams()DelegatedDynamicObjectgetTbasicTarget()TBasicVMgetTbasicVm()ObjectgetThis()booleanisContextManagingSupported()IRuntimeContextpopContext()Object[]popLocalFrame()ObjectpopThis()voidpushContext(IRuntimeContext context)voidpushLocalFrame(Object[] frame)voidpushThis(Object thisObject)voidsetContext(IRuntimeContext context)
-
-
-
Constructor Detail
-
TBasicContextHolderEnv
public TBasicContextHolderEnv(IRuntimeEnv env, DelegatedDynamicObject tbasicTarget, Object[] params, TBasicVM tbasicVM)
Create an instance ofTBasicContextHolderEnvinitialized with environment,DelegatedDynamicObjectfor variables,execution VM and parameters.- Parameters:
env-tbasicTarget-params-tbasicVM-
-
-
Method Detail
-
assignValueToVariable
public void assignValueToVariable(String variableName, Object value)
Create new variable in context(if variable with specified name does not exist) and sets its value.- Parameters:
variableName- Name of variable to initiate.value- Initial value of new variable.
-
getEnv
public IRuntimeEnv getEnv()
-
getLocalFrame
public Object[] getLocalFrame()
- Specified by:
getLocalFramein interfaceIRuntimeEnv
-
getRunner
public IOpenRunner getRunner()
- Specified by:
getRunnerin interfaceIRuntimeEnv
-
getTbasicParams
public Object[] getTbasicParams()
- Returns:
- the tbasicParams
-
getTbasicTarget
public DelegatedDynamicObject getTbasicTarget()
-
getTbasicVm
public TBasicVM getTbasicVm()
-
getThis
public Object getThis()
- Specified by:
getThisin interfaceIRuntimeEnv
-
popLocalFrame
public Object[] popLocalFrame()
- Specified by:
popLocalFramein interfaceIRuntimeEnv
-
popThis
public Object popThis()
- Specified by:
popThisin interfaceIRuntimeEnv
-
pushLocalFrame
public void pushLocalFrame(Object[] frame)
- Specified by:
pushLocalFramein interfaceIRuntimeEnv
-
pushThis
public void pushThis(Object thisObject)
- Specified by:
pushThisin interfaceIRuntimeEnv
-
getContext
public IRuntimeContext getContext()
- Specified by:
getContextin interfaceIRuntimeEnv
-
setContext
public void setContext(IRuntimeContext context)
- Specified by:
setContextin interfaceIRuntimeEnv
-
isContextManagingSupported
public boolean isContextManagingSupported()
- Specified by:
isContextManagingSupportedin interfaceIRuntimeEnv
-
popContext
public IRuntimeContext popContext()
- Specified by:
popContextin interfaceIRuntimeEnv
-
pushContext
public void pushContext(IRuntimeContext context)
- Specified by:
pushContextin interfaceIRuntimeEnv
-
-