public class MockRecordNamespace extends MockNamespace
Modifier and Type | Method and Description |
---|---|
void |
addNewVariable(String name,
Type type,
boolean isDefinedInExpression)
Adds a new variable.
|
boolean |
containsVariable(String name)
Returns
true if this namespace contains variable of given name. |
ClosureHolder |
createClosure(ClosureType closureType,
MethodExpression operationExpression,
ClosureOrigin origin)
Creates new closure corresponding to given operation expression.
|
Collection<String> |
getModuleNames()
Returns collection of all module names.
|
Namespace |
getModuleNamespace(String name)
Returns module namespace by its module name or
null if it does not exist. |
NamespaceModel |
getNamespaceModel()
Returns
NamespaceModel for this namespace. |
RecordHolder |
getThis()
Returns object that represents this.
|
Set<String> |
getVariableNames()
Returns the names of all the variables.
|
Type |
getVariableType(String name)
Returns the type of variable or null if it does not exist.
|
Object |
getVariableValue(String name)
Returns value of variable for given name from this namespace.
|
void |
setVariableValue(String name,
Object value)
Sets value of variable for given name from this namespace.
|
canBeInterpretedIn, createBinaryHolder, createBinaryHolder, createChildNamespace, createClosure, createClosure, createClosureFromExpression, createExternalRecordProxy, createList, createMap, createNonSharedRecord, createRange, createRecord, createRecord, createRecord, createRecord, createReference, createSet, executeJavaOperation, getConfiguration, getConstantValue, getContextId, getEvaluationLevel, getExecutionContext, getExecutorFactory, getFreeType, getHolderFactory, getJavaObject, getLowerLevelNamespace, getModelElementId, getModelId, getModelInstanceId, getName, getNamespaceInLevel, getParentNamespace, getPathQID, remove, resolveRecordType, resolveType, setFreeType, setPerformReadOnlyCheck, toString
public ClosureHolder createClosure(ClosureType closureType, MethodExpression operationExpression, ClosureOrigin origin)
HolderFactory
createClosure
in interface HolderFactory
createClosure
in class MockNamespace
public RecordHolder getThis()
Namespace
getThis
in interface Namespace
getThis
in class MockNamespace
public Namespace getModuleNamespace(String name)
Namespace
null
if it does not exist.getModuleNamespace
in interface Namespace
getModuleNamespace
in class MockNamespace
public boolean containsVariable(String name)
Namespace
true
if this namespace contains variable of given name.containsVariable
in interface Namespace
containsVariable
in class MockNamespace
name
- variable namepublic Set<String> getVariableNames()
Namespace
getVariableNames
in interface Namespace
getVariableNames
in class MockNamespace
public Object getVariableValue(String name)
Namespace
Null
is returned
if this namespace does not contain given variable.getVariableValue
in interface Namespace
getVariableValue
in class MockNamespace
name
- variable namepublic void setVariableValue(String name, Object value)
Namespace
setVariableValue
in interface Namespace
setVariableValue
in class MockNamespace
name
- variable namevalue
- new variable valuepublic Type getVariableType(String name)
Namespace
getVariableType
in interface Namespace
getVariableType
in class MockNamespace
name
- variable namepublic NamespaceModel getNamespaceModel()
Namespace
NamespaceModel
for this namespace.getNamespaceModel
in interface Namespace
getNamespaceModel
in class MockNamespace
NamespaceModel
for this namespacepublic Collection<String> getModuleNames()
Namespace
getModuleNames
in interface Namespace
getModuleNames
in class MockNamespace
public void addNewVariable(String name, Type type, boolean isDefinedInExpression)
Namespace
addNewVariable
in interface Namespace
addNewVariable
in class MockNamespace
Copyright © 2007-2018 Whitestein Technologies. All Rights Reserved.