public interface EnvironmentFactory extends Adaptable, Customizable
This interface is not intended to be implemented to be implemented
"directly" by providers of metamodel bindings.
It is highly recommended to extend the AbstractEnvironmentFactory
class, instead.
Modifier and Type | Interface and Description |
---|---|
static interface |
EnvironmentFactory.EnvironmentFactoryExtension |
Modifier and Type | Method and Description |
---|---|
org.eclipse.emf.common.notify.Adapter |
adapt(org.eclipse.emf.common.notify.Notifier notifier) |
EvaluationEnvironment |
createEvaluationEnvironment(EvaluationEnvironment parent,
NamedElement executableObject)
Deprecated.
no longer used
|
EvaluationEnvironment |
createEvaluationEnvironment(NamedElement executableObject,
ModelManager modelManager)
Creates a new evaluation environment to track the values of variables in
an OCL expression as it is evaluated.
|
EvaluationVisitor |
createEvaluationVisitor(EvaluationEnvironment evalEnv)
Creates a new evaluation visitor, for the evaluation of OCL expressions.
|
EvaluationVisitor |
createEvaluationVisitor(java.lang.Object context,
ExpressionInOCL expression,
ModelManager modelManager)
Creates a new evaluation visitor, for the evaluation of an OCL expression on a context using an environment and a modelManager.
|
ModelManager |
createModelManager(java.lang.Object object)
Creates an extent map for invocation of OclType.allInstances()
using the specified
object as a context from which to find
the scope in which OCL classifier extents are defined. |
OCL |
createOCL()
Creates a new
OCL instance attached to this EnvironmentFactory . |
CompleteEnvironment |
getCompleteEnvironment()
Return the CompleteEnvironment that supervises the additional types need for collections specializations and tuples.
|
CompleteModel |
getCompleteModel()
Return the CompleteModel that contains all the CompletePackages, which in turn contain all the CompleteClasses that
define the merge of individual Packages and Classes.
|
IdResolver |
getIdResolver()
Return the IdResolver that performs the resolution of the lightweight usage-independent Ids of types and packages
into the full usage-specific equivalents.
|
MetamodelManager |
getMetamodelManager()
Return the MetamodelManager used to supervise the normalized Abstract Syntax representations of the metamodels.
|
ProjectManager |
getProjectManager()
Return the ProjectManager used to supervise the mappings and regustrations for external resource names such as those for Eclipse
projects that enable those resources to be accessed and exploited.
|
org.eclipse.emf.ecore.resource.ResourceSet |
getResourceSet()
Return the external ResourceSet used to hold External Syntax (e.g.
|
StatusCodes.Severity |
getSeverity(java.lang.Object validationKey)
Return the StatusCodes severity with which the validation identified by validationKey is reported.
|
StandardLibrary |
getStandardLibrary()
Return the (OCL) Standard Library that provides the build-in language facilities such as the OclAny and Set types.
|
StatusCodes.Severity |
setSeverity(java.lang.Object validationKey,
StatusCodes.Severity severity)
Define the StatusCodes severity with which the validation identified by validationKey is reported.
|
getAdapter
clearOptions, getOptions, getValue, isEnabled, putOptions, removeOption, removeOptions, setOption
@NonNull org.eclipse.emf.common.notify.Adapter adapt(@NonNull org.eclipse.emf.common.notify.Notifier notifier)
@NonNull EvaluationEnvironment createEvaluationEnvironment(@NonNull NamedElement executableObject, @NonNull ModelManager modelManager)
@Deprecated @NonNull EvaluationEnvironment createEvaluationEnvironment(@NonNull EvaluationEnvironment parent, @NonNull NamedElement executableObject)
@NonNull EvaluationVisitor createEvaluationVisitor(@Nullable java.lang.Object context, @NonNull ExpressionInOCL expression, @Nullable ModelManager modelManager)
@NonNull EvaluationVisitor createEvaluationVisitor(@NonNull EvaluationEnvironment evalEnv)
evalEnv
- the evaluation environment that the visitor is to use
for tracking variables, navigating properties, etc.@NonNull ModelManager createModelManager(@Nullable java.lang.Object object)
object
as a context from which to find
the scope in which OCL classifier extents are defined. This scope may
be a resource, resource set, or some metamodel-specific scope. Note that
in the case that the object
is not an
EObject
but is, instead, some primitive
type, then this may be difficult to determine.
Clients are encouraged to do what they can to optimize this mapping, by
lazy initialization of key-value pairs, workspace indices, or whatever
means is available. Note that the map will only ever be accessed by
key (Map.get(java.lang.Object)
); it will never be queried for
all entries, all keys, all values, etc. This knowledge could help
optimization.
object
- a context object in the scope that covers the OCL
classifier extents@NonNull OCL createOCL()
Creates a new OCL
instance attached to this EnvironmentFactory
.
Clients should call OCL.dispose()
to detach once they have no further use for
the OCL.
OCL
instance attached to this EnvironmentFactory
@NonNull CompleteEnvironment getCompleteEnvironment()
@NonNull CompleteModel getCompleteModel()
@NonNull IdResolver getIdResolver()
@NonNull MetamodelManager getMetamodelManager()
@NonNull ProjectManager getProjectManager()
@NonNull org.eclipse.emf.ecore.resource.ResourceSet getResourceSet()
StatusCodes.Severity getSeverity(@Nullable java.lang.Object validationKey)
@NonNull StandardLibrary getStandardLibrary()
StatusCodes.Severity setSeverity(@NonNull java.lang.Object validationKey, StatusCodes.Severity severity)