public class MockRecordNamespace extends MockNamespacePart
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. |
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.
|
getAllFreeTypeNames, getConstantValue, getFreeType, getModuleNames, getModuleNamespace, getParentNamespace, resolveType
addNewVariable, canBeInterpretedIn, createBinaryHolder, createBinaryHolder, createChildNamespace, createClosure, createClosure, createClosure, createClosureFromExpression, createExternalRecordProxy, createList, createMap, createMap, createNonSharedRecord, createRange, createRecord, createRecord, createReference, createSet, executeJavaOperation, getCompiled, getCompiled, getConfiguration, getContextId, getEvaluationLevel, getExecutionContext, getHolderFactory, getJavaObject, getLowerLevelNamespace, getModelElementId, getModelId, getModelInstanceId, getName, getNamespaceInLevel, getPathQID, initializeVariable, isVariableReadOnly, remove, setCompiled, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createChildNamespace, getFreeTypeMapping, getTopNamespace, resolveRecordType
createRecord, createRecord
public RecordHolder getThis()
Namespace
getThis
in interface Namespace
getThis
in class MockNamespacePart
public boolean containsVariable(String name)
Namespace
true
if this namespace contains variable of given name.containsVariable
in interface Namespace
containsVariable
in class AbstractMockNamespace
name
- variable namepublic Set<String> getVariableNames()
Namespace
getVariableNames
in interface Namespace
getVariableNames
in class AbstractMockNamespace
public Object getVariableValue(String name)
Namespace
Null
is returned
if this namespace does not contain given variable.getVariableValue
in interface Namespace
getVariableValue
in class AbstractMockNamespace
name
- variable namepublic void setVariableValue(String name, Object value)
Namespace
setVariableValue
in interface Namespace
setVariableValue
in class AbstractMockNamespace
name
- variable namevalue
- new variable valuepublic Type getVariableType(String name)
Namespace
getVariableType
in interface Namespace
getVariableType
in class AbstractMockNamespace
name
- variable namepublic NamespaceModel getNamespaceModel()
Namespace
NamespaceModel
for this namespace.getNamespaceModel
in interface Namespace
getNamespaceModel
in class MockNamespacePart
NamespaceModel
for this namespaceCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.