public abstract class AbstractExecutionContext extends java.lang.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.
|
java.lang.String[] |
getStackTraceInfo()
Returns the stack trace info from the interpreter stack trace.
|
java.lang.Object |
getVariableValue(QID name)
Resolves variable for given name and returns its value.
|
java.lang.Object |
getVariableValue(java.lang.String name)
Deprecated.
|
Namespace |
resolveVariableNamespace(QID qid)
Resolves variable for given name and returns its containing namespace.
|
Namespace |
resolveVariableNamespace(java.lang.String name)
Deprecated.
|
void |
setVariableValue(QID name,
java.lang.Object value)
Resolves variable for given name and sets its value.
|
void |
setVariableValue(java.lang.String name,
java.lang.Object value)
Deprecated.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddSignal, flushAll, getCompiled, getCompiled, getComponentService, getContextId, getConverter, getEvaluationLevel, getInLevel, getModelElement, getModelInstance, getModelProvider, getNamespace, getParentContext, getPath, getPathQID, getProcessInstance, getProcessModel, getProcessPath, getProcessPathQID, setCompiledgetHandle, getValueHolderaddExecutionTrace, addExecutionTraceElement, getExecutionTraceprotected AbstractExecutionContext()
protected AbstractExecutionContext(InterpreterStackTrace stackTrace)
@Deprecated public Namespace resolveVariableNamespace(java.lang.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 ExecutionContextname - 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 ExecutionContextqid - variable nameprotected abstract NamespaceModel getNamespaceModel()
public java.lang.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 ExecutionContextname - a variable namepublic void setVariableValue(QID name, java.lang.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 ExecutionContextname - a variable namevalue - a new variable value@Deprecated public java.lang.Object getVariableValue(java.lang.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 ExecutionContextname - a variable name@Deprecated
public void setVariableValue(java.lang.String name,
java.lang.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 ExecutionContextname - a variable namevalue - a new variable valuepublic InterpreterStackTrace getStackTrace()
ExecutionContexterror exceptions.
The method returns null if the execution context is not a
JavaOperationExecutionContext.
getStackTrace in interface ExecutionContextnullpublic final java.lang.String[] getStackTraceInfo()
ExecutionContextShould be equivalent to
return getStackTrace() != null ? getStackTrace().getStackTraceInfo() : null;
getStackTraceInfo in interface ExecutionContextpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.