public abstract class AbstractExecutionContext extends Object implements ExecutionContext
ExecutionContext
that should be
common to all its implementations.Modifier | Constructor and Description |
---|---|
protected |
AbstractExecutionContext()
Creates new instance.
|
protected |
AbstractExecutionContext(InterpreterStackTrace stackTrace) |
Modifier and Type | Method and Description |
---|---|
protected abstract NamespaceModel |
getNamespaceModel()
Returns namespace model for this context.
|
InterpreterStackTrace |
getStackTrace()
Returns the interpreter stack trace.
|
String[] |
getStackTraceInfo()
Returns the stack trace info from the interpreter stack trace.
|
Object |
getVariableValue(QID name)
Resolves variable for given name and returns its value.
|
Object |
getVariableValue(String name)
Deprecated.
|
Namespace |
resolveVariableNamespace(QID qid)
Resolves variable for given name and returns its containing namespace.
|
Namespace |
resolveVariableNamespace(String name)
Deprecated.
|
void |
setVariableValue(QID name,
Object value)
Resolves variable for given name and sets its value.
|
void |
setVariableValue(String name,
Object value)
Deprecated.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addSignal, flushAll, getCompiled, getCompiled, getComponentService, getContextId, getConverter, getEvaluationLevel, getInLevel, getModelElement, getModelInstance, getModelProvider, getNamespace, getParentContext, getPath, getPathQID, getProcessInstance, getProcessModel, getProcessPath, getProcessPathQID, setCompiled
getHandle, getValueHolder
addExecutionTrace, addExecutionTraceElement, getExecutionTrace
protected AbstractExecutionContext()
protected AbstractExecutionContext(InterpreterStackTrace stackTrace)
@Deprecated public Namespace resolveVariableNamespace(String name)
ExecutionContext
The resolution goes primarily into parents, if it fails then it looks in the imports.
The resolution throws IllegalArgumentException
if the variable is not found
or the name is ambiguous.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
resolveVariableNamespace
in interface ExecutionContext
name
- variable namepublic Namespace resolveVariableNamespace(QID qid)
ExecutionContext
The resolution goes primarily into parents, if it fails then it looks in the imports.
The resolution throws IllegalArgumentException
if the variable is not found
or the name is ambiguous.
resolveVariableNamespace
in interface ExecutionContext
qid
- variable nameprotected abstract NamespaceModel getNamespaceModel()
public Object getVariableValue(QID name)
ExecutionContext
Difference between this method and
Namespace.getVariableValue(String)
is that the latter return only value directly from
its namespace while this one does resolution of namespace and calls
Namespace.getVariableValue(String)
on the resolved namespace.
getVariableValue
in interface ExecutionContext
name
- a variable namepublic void setVariableValue(QID name, Object value)
ExecutionContext
Difference between this method and
Namespace.setVariableValue(String, Object)
is that the latter sets variable
directly from its namespace while this one does resolution of namespace and calls
Namespace.setVariableValue(String, Object)
on the resolved namespace.
setVariableValue
in interface ExecutionContext
name
- a variable namevalue
- a new variable value@Deprecated public Object getVariableValue(String name)
ExecutionContext
Difference between this method and
Namespace.getVariableValue(String)
is that the latter return only value directly from
its namespace while this one does resolution of namespace and calls
Namespace.getVariableValue(String)
on the resolved namespace.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
getVariableValue
in interface ExecutionContext
name
- a variable name@Deprecated public void setVariableValue(String name, Object value)
ExecutionContext
Difference between this method and
Namespace.setVariableValue(String, Object)
is that the latter sets variable
directly from its namespace while this one does resolution of namespace and calls
Namespace.setVariableValue(String, Object)
on the resolved namespace.
Known issue: The name parameter should be unescaped name. The method may not work correctly if the variable name is a full name (i.e. with module prefix) and contains special characters.
setVariableValue
in interface ExecutionContext
name
- a variable namevalue
- a new variable valuepublic InterpreterStackTrace getStackTrace()
ExecutionContext
error exceptions
.
The method returns null
if the execution context is not a
JavaOperationExecutionContext
.
getStackTrace
in interface ExecutionContext
null
public final String[] getStackTraceInfo()
ExecutionContext
Should be equivalent to
return getStackTrace() != null ? getStackTrace().getStackTraceInfo() : null;
getStackTraceInfo
in interface ExecutionContext
Copyright © 2007-2020 Whitestein Technologies. All Rights Reserved.