public abstract class AbstractContextNamespace extends java.lang.Object implements Namespace, JavaOperationExecutor
| Constructor and Description |
|---|
AbstractContextNamespace(ModelProvider modelProvider,
Context context)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected Namespace |
createChildNamespaceInternal(java.lang.String name,
java.util.List<? extends Field> fields,
java.util.List<?> values,
java.util.Map<FreeType,Type> freeTypeMapping,
InterpreterConfiguration configuration)
Creates child namespace in required evaluation level.
|
ListHolder |
createRange(long first,
long last)
Creates a range (list) defined by endpoints (both inclusive).
|
java.lang.Object |
executeJavaOperation(java.lang.String className,
java.lang.String methodName,
java.lang.Class<?>[] argClasses,
java.lang.Object[] evaluatedArgs,
InterpreterStackTrace stackTrace)
Executes the operation.
|
java.util.Set<java.lang.String> |
getAllFreeTypeNames()
Returns all free type names.
|
CompiledNamespace |
getCompiled() |
java.lang.Object |
getCompiled(java.lang.String moduleName) |
CompiledContext |
getCompiledContext(Namespace moduleNamespace,
java.lang.String evaluationLevel) |
java.lang.Object |
getConstantValue(java.lang.String moduleName,
java.lang.String constantName)
Returns the value of the constant with the given name from a (imported)
module with a given module name.
|
protected Context |
getContext()
Returns context.
|
long |
getContextId()
Returns context id.
|
protected RuntimeToPersistentConverter |
getConverter()
Returns instance of
RuntimeToPersistentConverter. |
protected EvaluationLevelConverter |
getEvaluationConverter()
Returns instance of
EvaluationLevelConverter. |
java.lang.String |
getEvaluationLevel()
Returns evaluation level.
|
ExecutionContext |
getExecutionContext() |
Type |
getFreeType(FreeType type)
Returns the value of given free type or null if it does not exist in this context.
|
protected Context |
getFunctionContext(FunctionExpression expression) |
java.lang.String |
getModelElementId()
Returns id of model element that is related to this namespace.
|
long |
getModelId()
Returns model id.
|
long |
getModelInstanceId()
Returns model instance id.
|
ModelProvider |
getModelProvider()
Returns the model provider
|
java.util.Collection<java.lang.String> |
getModuleNames()
Returns collection of all module names.
|
java.lang.String |
getName()
Returns name of this namespace.
|
protected AbstractContextNamespace |
getNamespace(Context ctx)
Returns namespace for a context.
|
AbstractContextNamespace |
getNamespaceInLevel(java.lang.String level)
Returns namespace in evaluation level.
|
NamespaceModel |
getNamespaceModel()
Returns
NamespaceModel for this namespace. |
QID |
getPathQID()
Returns
QID of the context path. |
com.whitestein.lsps.model.ProcessModel |
getProcessModel()
Returns process model.
|
protected Context |
getReferencedContext(ContextReferencingExpression expression) |
RecordHolder |
getThis()
Returns object that represents this.
|
java.lang.Object |
getVariableValue(java.lang.String name)
Returns value of variable for given name from this namespace.
|
void |
remove()
INTERNAL API.
|
Type |
resolveType(java.lang.String type)
Resolves type.
|
void |
setCompiled(java.lang.Object compiledContext) |
protected void |
setVariableValueInternal(java.lang.String name,
Type type,
java.lang.Object value) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddNewVariable, addNewVariable, canBeInterpretedIn, containsVariable, createChildNamespace, createChildNamespace, getConfiguration, getFreeTypeMapping, getHolderFactory, getJavaObject, getLowerLevelNamespace, getModuleNamespace, getParentNamespace, getTopNamespace, getVariableNames, getVariableType, initializeVariable, isVariableReadOnly, resolveRecordType, setVariableValuecreateBinaryHolder, createBinaryHolder, createClosure, createClosure, createClosure, createClosureFromExpression, createExternalRecordProxy, createList, createMap, createMap, createNonSharedRecord, createRecord, createRecord, createRecord, createRecord, createReference, createSetpublic AbstractContextNamespace(ModelProvider modelProvider, Context context)
modelProvider - context - public ModelProvider getModelProvider()
protected Context getContext()
public java.lang.String getName()
Namespacenull and does not have to be
unique. Multiple namespaces can share same name.public com.whitestein.lsps.model.ProcessModel getProcessModel()
public NamespaceModel getNamespaceModel()
NamespaceNamespaceModel for this namespace.getNamespaceModel in interface NamespaceNamespaceModel for this namespacepublic long getModelId()
NamespacegetModelId in interface Namespacepublic long getModelInstanceId()
NamespacegetModelInstanceId in interface Namespacepublic java.lang.String getModelElementId()
NamespacegetModelElementId in interface Namespacepublic long getContextId()
NamespacegetContextId in interface Namespaceprotected RuntimeToPersistentConverter getConverter()
RuntimeToPersistentConverter.protected EvaluationLevelConverter getEvaluationConverter()
EvaluationLevelConverter.public java.lang.Object getConstantValue(java.lang.String moduleName,
java.lang.String constantName)
NamespacegetConstantValue in interface Namespacenull if there is no such a constantpublic Type resolveType(java.lang.String type)
NamespaceresolveType in interface Namespacepublic Type getFreeType(FreeType type)
NamespacegetFreeType in interface Namespaceprotected void setVariableValueInternal(java.lang.String name,
Type type,
java.lang.Object value)
public java.lang.String getEvaluationLevel()
getEvaluationLevel in interface Namespacepublic java.lang.Object getVariableValue(java.lang.String name)
NamespaceNull is returned
if this namespace does not contain given variable.getVariableValue in interface Namespacename - variable namepublic QID getPathQID()
NamespaceQID of the context path.getPathQID in interface NamespaceQID of the context pathpublic java.lang.Object executeJavaOperation(java.lang.String className,
java.lang.String methodName,
java.lang.Class<?>[] argClasses,
java.lang.Object[] evaluatedArgs,
InterpreterStackTrace stackTrace)
throws ErrorException
JavaOperationExecutorexecuteJavaOperation in interface JavaOperationExecutorstackTrace - a stack traceErrorException - the error exceptionpublic java.lang.String toString()
toString in class java.lang.Objectprotected Namespace createChildNamespaceInternal(java.lang.String name, java.util.List<? extends Field> fields, java.util.List<?> values, java.util.Map<FreeType,Type> freeTypeMapping, InterpreterConfiguration configuration)
name - fields - values - freeTypeMapping - configuration - public AbstractContextNamespace getNamespaceInLevel(java.lang.String level)
NamespacegetNamespaceInLevel in interface Namespaceprotected AbstractContextNamespace getNamespace(Context ctx)
ctx - public ExecutionContext getExecutionContext()
getExecutionContext in interface Namespacepublic RecordHolder getThis()
Namespacepublic ListHolder createRange(long first, long last)
HolderFactory
If first <= last, the range contains elements first, first + 1, ..., last.
If first > last, the range contains elements first, first - 1, ..., last.
The memory footprint of range in constant (only endpoints and size is stored, not all elements).
createRange in interface HolderFactoryprotected Context getReferencedContext(ContextReferencingExpression expression)
protected Context getFunctionContext(FunctionExpression expression)
public void remove()
Namespacepublic java.util.Collection<java.lang.String> getModuleNames()
NamespacegetModuleNames in interface Namespacepublic CompiledNamespace getCompiled()
getCompiled in interface Namespacepublic java.lang.Object getCompiled(java.lang.String moduleName)
getCompiled in interface Namespacepublic void setCompiled(java.lang.Object compiledContext)
setCompiled in interface Namespacepublic CompiledContext getCompiledContext(Namespace moduleNamespace, java.lang.String evaluationLevel)
public java.util.Set<java.lang.String> getAllFreeTypeNames()
NamespacegetAllFreeTypeNames in interface NamespaceCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.