public abstract class AbstractContextNamespace extends Object implements Namespace, JavaOperationExecutor
| Constructor and Description |
|---|
AbstractContextNamespace(ModelProviderClientService modelProviderService,
Context context)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkCanAssignToVariable(Context context,
String name)
Check if it is possible to assign a value to variable.
|
protected Namespace |
createChildNamespaceInternal(String name,
Collection<Field> fields,
Collection<?> values,
InterpreterConfiguration configuration)
Creates child namespace in required evaluation level.
|
ListHolder |
createRange(long first,
long last)
Creates a range (list) defined by endpoints (both inclusive).
|
Object |
executeJavaOperation(String className,
String methodName,
Class<?>[] argClasses,
List<Object> evaluatedArgs,
InterpreterStackTrace stackTrace)
Executes the operation.
|
Object |
getConstantValue(String moduleName,
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. |
String |
getEvaluationLevel()
Returns evaluation level.
|
ExecutionContext |
getExecutionContext() |
protected long |
getFunctionContextId(FunctionExpression expression) |
String |
getModelElementId()
Returns id of model element that is related to this namespace.
|
long |
getModelId()
Returns model id.
|
long |
getModelInstanceId()
Returns model instance id.
|
ModelProviderClientService |
getModelProviderService()
Returns the provided model provider service.
|
String |
getName()
Returns name of this namespace.
|
protected AbstractContextNamespace |
getNamespace(Context ctx)
Returns namespace for a context.
|
AbstractContextNamespace |
getNamespaceInLevel(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 long |
getReferencedContextId(ContextReferencingExpression expression) |
RecordHolder |
getThis()
Returns object that represents this.
|
void |
remove()
INTERNAL API.
|
RecordType |
resolveRecordType(String type)
Resolves record type and returns its type.
|
Type |
resolveType(String type)
Resolves type.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddNewVariable, canBeInterpretedIn, containsVariable, createChildNamespace, getConfiguration, getFreeType, getHolderFactory, getJavaObject, getLowerLevelNamespace, getModuleNames, getModuleNamespace, getParentNamespace, getVariableNames, getVariableType, getVariableValue, setFreeType, setPerformReadOnlyCheck, setVariableValuecreateBinaryHolder, createBinaryHolder, createClosure, createClosure, createClosure, createClosureFromExpression, createExternalRecordProxy, createList, createMap, createNonSharedRecord, createRecord, createRecord, createRecord, createRecord, createReference, createSetpublic AbstractContextNamespace(ModelProviderClientService modelProviderService, Context context)
modelProviderService - context - public ModelProviderClientService getModelProviderService()
protected Context getContext()
public 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 String getModelElementId()
NamespacegetModelElementId in interface Namespacepublic long getContextId()
NamespacegetContextId in interface Namespaceprotected RuntimeToPersistentConverter getConverter()
RuntimeToPersistentConverter.protected EvaluationLevelConverter getEvaluationConverter()
EvaluationLevelConverter.public Object getConstantValue(String moduleName, String constantName)
NamespacegetConstantValue in interface Namespacenull if there is no such a constantpublic RecordType resolveRecordType(String type)
NamespaceNamespaceModel.findNamedType(QID) as follows:
final boolean recordExists = getNamespaceModel().findNamedType(QID.parse(type)) != null;
resolveRecordType in interface Namespacetype - fully qualified record type, not null.public Type resolveType(String type)
NamespaceresolveType in interface Namespaceprotected void checkCanAssignToVariable(Context context, String name)
context - name - public String getEvaluationLevel()
getEvaluationLevel in interface Namespacepublic QID getPathQID()
NamespaceQID of the context path.getPathQID in interface NamespaceQID of the context pathpublic Object executeJavaOperation(String className, String methodName, Class<?>[] argClasses, List<Object> evaluatedArgs, InterpreterStackTrace stackTrace) throws ErrorException
JavaOperationExecutorexecuteJavaOperation in interface JavaOperationExecutorstackTrace - a stack traceErrorException - the error exceptionprotected Namespace createChildNamespaceInternal(String name, Collection<Field> fields, Collection<?> values, InterpreterConfiguration configuration)
name - fields - values - configuration - public AbstractContextNamespace getNamespaceInLevel(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 long getReferencedContextId(ContextReferencingExpression expression)
protected long getFunctionContextId(FunctionExpression expression)
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.