org.openarchitectureware.expression
Class ExecutionContextImpl
java.lang.Object
org.openarchitectureware.expression.ExecutionContextImpl
- All Implemented Interfaces:
- ExecutionContext, TypeSystem
- Direct Known Subclasses:
- XpandExecutionContextImpl
public class ExecutionContextImpl
- extends java.lang.Object
- implements ExecutionContext
- Author:
- Sven Efftinge (http://www.efftinge.de), Arno Haase, Peter Friese
Constructor Summary |
ExecutionContextImpl()
|
ExecutionContextImpl(java.util.Map<java.lang.String,Variable> globalVars)
|
ExecutionContextImpl(ResourceManager resourceManager,
Resource resource,
TypeSystemImpl typeSystem,
java.util.Map<java.lang.String,Variable> variables,
java.util.Map<java.lang.String,Variable> globalVars,
ProgressMonitor monitor,
ExceptionHandler exceptionHandler,
java.util.List<Around> advices,
NullEvaluationHandler neh2,
java.util.Map<Resource,java.util.Set<Extension>> extensionPerResourceMap,
Callback callback)
|
ExecutionContextImpl(ResourceManager resourceManager,
TypeSystemImpl typeSystem,
java.util.Map<java.lang.String,Variable> globalVars)
|
ExecutionContextImpl(TypeSystemImpl ts)
|
ExecutionContextImpl(TypeSystemImpl ts,
java.util.Map<java.lang.String,Variable> globalVars)
|
Method Summary |
ExecutionContextImpl |
cloneContext()
|
ExecutionContext |
cloneWithoutMonitor()
|
ExecutionContext |
cloneWithoutResource()
|
ExecutionContext |
cloneWithoutVariables()
|
ExecutionContext |
cloneWithResource(Resource ns)
|
ExecutionContext |
cloneWithVariable(Variable v)
|
Resource |
currentResource()
|
Operation |
findOperation(java.lang.String name,
java.lang.Object target,
java.lang.Object[] params)
|
Property |
findProperty(java.lang.String name,
java.lang.Object target)
|
Type[] |
findTypesForPrefix(java.lang.String prefix)
|
java.util.Set<? extends Extension> |
getAllExtensions()
|
Type[] |
getAllTypes()
|
Type |
getBooleanType()
|
Callback |
getCallback()
|
Type |
getCollectionType(Type innerType)
|
Extension |
getExtension(java.lang.String functionName,
java.lang.Object[] actualParameters)
|
java.util.List<Around> |
getExtensionAdvices()
|
Extension |
getExtensionForTypes(java.lang.String functionName,
Type[] parameterTypes)
|
Type |
getFeatureType()
|
java.util.Map<java.lang.String,Variable> |
getGlobalVariables()
accessible only through special extension methods |
protected java.lang.String[] |
getImportedNamespaces()
|
Type |
getIntegerType()
|
Type |
getListType(Type innerType)
|
ProgressMonitor |
getMonitor()
Retrieves the associated ProgressMonitor |
java.util.Set<java.lang.String> |
getNamespaces()
|
Type |
getObjectType()
|
Type |
getOperationType()
|
Type |
getPropertyType()
|
Type |
getRealType()
|
ResourceManager |
getResourceManager()
Retrieves the associated ResourceManager |
Type |
getSetType(Type innerType)
|
Type |
getStaticPropertyType()
|
Type |
getStringType()
|
Type |
getType(java.lang.Object obj)
|
Type |
getTypeForName(java.lang.String name)
|
Type |
getTypeType()
|
Variable |
getVariable(java.lang.String name)
|
java.util.Map<java.lang.String,Variable> |
getVisibleVariables()
|
Type |
getVoidType()
|
java.lang.Object |
handleNullEvaluation(SyntaxElement element)
|
void |
handleRuntimeException(java.lang.RuntimeException ex,
SyntaxElement element,
java.util.Map<java.lang.String,java.lang.Object> additionalContextInfo)
|
void |
postTask(java.lang.Object element)
|
void |
preTask(java.lang.Object element)
|
void |
registerExtensionAdvices(java.lang.String fullyQualifiedName)
|
void |
registerMetaModel(MetaModel mm)
|
void |
release()
Clears internal resources (caches). |
void |
setFileEncoding(java.lang.String encoding)
|
void |
setMonitor(ProgressMonitor monitor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resourceManager
protected ResourceManager resourceManager
typeSystem
protected final TypeSystemImpl typeSystem
exceptionHandler
protected ExceptionHandler exceptionHandler
nullEvaluationHandler
protected NullEvaluationHandler nullEvaluationHandler
callback
protected Callback callback
allExtensionsPerResource
protected java.util.Map<Resource,java.util.Set<Extension>> allExtensionsPerResource
registeredExtensionAdvices
protected java.util.List<Around> registeredExtensionAdvices
ExecutionContextImpl
public ExecutionContextImpl()
ExecutionContextImpl
public ExecutionContextImpl(TypeSystemImpl ts)
ExecutionContextImpl
public ExecutionContextImpl(java.util.Map<java.lang.String,Variable> globalVars)
ExecutionContextImpl
public ExecutionContextImpl(TypeSystemImpl ts,
java.util.Map<java.lang.String,Variable> globalVars)
ExecutionContextImpl
public ExecutionContextImpl(ResourceManager resourceManager,
TypeSystemImpl typeSystem,
java.util.Map<java.lang.String,Variable> globalVars)
ExecutionContextImpl
public ExecutionContextImpl(ResourceManager resourceManager,
Resource resource,
TypeSystemImpl typeSystem,
java.util.Map<java.lang.String,Variable> variables,
java.util.Map<java.lang.String,Variable> globalVars,
ProgressMonitor monitor,
ExceptionHandler exceptionHandler,
java.util.List<Around> advices,
NullEvaluationHandler neh2,
java.util.Map<Resource,java.util.Set<Extension>> extensionPerResourceMap,
Callback callback)
getCallback
public Callback getCallback()
- Specified by:
getCallback
in interface ExecutionContext
registerMetaModel
public void registerMetaModel(MetaModel mm)
findOperation
public Operation findOperation(java.lang.String name,
java.lang.Object target,
java.lang.Object[] params)
- Specified by:
findOperation
in interface TypeSystem
findProperty
public Property findProperty(java.lang.String name,
java.lang.Object target)
- Specified by:
findProperty
in interface TypeSystem
findTypesForPrefix
public Type[] findTypesForPrefix(java.lang.String prefix)
- Specified by:
findTypesForPrefix
in interface TypeSystem
getAllTypes
public Type[] getAllTypes()
- Specified by:
getAllTypes
in interface TypeSystem
getNamespaces
public java.util.Set<java.lang.String> getNamespaces()
- Specified by:
getNamespaces
in interface TypeSystem
getBooleanType
public Type getBooleanType()
- Specified by:
getBooleanType
in interface TypeSystem
getCollectionType
public Type getCollectionType(Type innerType)
- Specified by:
getCollectionType
in interface TypeSystem
getFeatureType
public Type getFeatureType()
- Specified by:
getFeatureType
in interface TypeSystem
getIntegerType
public Type getIntegerType()
- Specified by:
getIntegerType
in interface TypeSystem
getListType
public Type getListType(Type innerType)
- Specified by:
getListType
in interface TypeSystem
getObjectType
public Type getObjectType()
- Specified by:
getObjectType
in interface TypeSystem
getOperationType
public Type getOperationType()
- Specified by:
getOperationType
in interface TypeSystem
getPropertyType
public Type getPropertyType()
- Specified by:
getPropertyType
in interface TypeSystem
getRealType
public Type getRealType()
- Specified by:
getRealType
in interface TypeSystem
getSetType
public Type getSetType(Type innerType)
- Specified by:
getSetType
in interface TypeSystem
getStaticPropertyType
public Type getStaticPropertyType()
- Specified by:
getStaticPropertyType
in interface TypeSystem
getStringType
public Type getStringType()
- Specified by:
getStringType
in interface TypeSystem
getType
public Type getType(java.lang.Object obj)
- Specified by:
getType
in interface TypeSystem
getTypeForName
public Type getTypeForName(java.lang.String name)
- Specified by:
getTypeForName
in interface TypeSystem
getImportedNamespaces
protected java.lang.String[] getImportedNamespaces()
getTypeType
public Type getTypeType()
- Specified by:
getTypeType
in interface TypeSystem
getVoidType
public Type getVoidType()
- Specified by:
getVoidType
in interface TypeSystem
cloneContext
public ExecutionContextImpl cloneContext()
setFileEncoding
public void setFileEncoding(java.lang.String encoding)
getVariable
public Variable getVariable(java.lang.String name)
- Specified by:
getVariable
in interface ExecutionContext
getVisibleVariables
public java.util.Map<java.lang.String,Variable> getVisibleVariables()
- Specified by:
getVisibleVariables
in interface ExecutionContext
getGlobalVariables
public java.util.Map<java.lang.String,Variable> getGlobalVariables()
- Description copied from interface:
ExecutionContext
- accessible only through special extension methods
- Specified by:
getGlobalVariables
in interface ExecutionContext
cloneWithVariable
public ExecutionContext cloneWithVariable(Variable v)
- Specified by:
cloneWithVariable
in interface ExecutionContext
cloneWithoutVariables
public ExecutionContext cloneWithoutVariables()
- Specified by:
cloneWithoutVariables
in interface ExecutionContext
cloneWithResource
public ExecutionContext cloneWithResource(Resource ns)
- Specified by:
cloneWithResource
in interface ExecutionContext
cloneWithoutResource
public ExecutionContext cloneWithoutResource()
- Specified by:
cloneWithoutResource
in interface ExecutionContext
cloneWithoutMonitor
public ExecutionContext cloneWithoutMonitor()
- Specified by:
cloneWithoutMonitor
in interface ExecutionContext
currentResource
public Resource currentResource()
- Specified by:
currentResource
in interface ExecutionContext
getAllExtensions
public java.util.Set<? extends Extension> getAllExtensions()
- Specified by:
getAllExtensions
in interface ExecutionContext
getExtensionForTypes
public Extension getExtensionForTypes(java.lang.String functionName,
Type[] parameterTypes)
- Specified by:
getExtensionForTypes
in interface ExecutionContext
getExtension
public Extension getExtension(java.lang.String functionName,
java.lang.Object[] actualParameters)
- Specified by:
getExtension
in interface ExecutionContext
setMonitor
public void setMonitor(ProgressMonitor monitor)
getMonitor
public ProgressMonitor getMonitor()
- Description copied from interface:
ExecutionContext
- Retrieves the associated ProgressMonitor
- Specified by:
getMonitor
in interface ExecutionContext
preTask
public void preTask(java.lang.Object element)
- Specified by:
preTask
in interface ExecutionContext
postTask
public void postTask(java.lang.Object element)
- Specified by:
postTask
in interface ExecutionContext
handleRuntimeException
public void handleRuntimeException(java.lang.RuntimeException ex,
SyntaxElement element,
java.util.Map<java.lang.String,java.lang.Object> additionalContextInfo)
- Specified by:
handleRuntimeException
in interface ExecutionContext
getResourceManager
public ResourceManager getResourceManager()
- Description copied from interface:
ExecutionContext
- Retrieves the associated ResourceManager
- Specified by:
getResourceManager
in interface ExecutionContext
registerExtensionAdvices
public void registerExtensionAdvices(java.lang.String fullyQualifiedName)
getExtensionAdvices
public java.util.List<Around> getExtensionAdvices()
- Specified by:
getExtensionAdvices
in interface ExecutionContext
handleNullEvaluation
public java.lang.Object handleNullEvaluation(SyntaxElement element)
- Specified by:
handleNullEvaluation
in interface ExecutionContext
release
public void release()
- Description copied from interface:
TypeSystem
- Clears internal resources (caches).
- Specified by:
release
in interface TypeSystem