Package com.nomagic.magicdraw.evaluation
Class EvaluationConfigurator
java.lang.Object
com.nomagic.magicdraw.evaluation.EvaluationConfigurator
This is an open api class for accessing opaque expression evaluators (for further configuring purposes).
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionEnumerates available evaluatable languages for opaque expressions Currently (as of v12.5) 2 languages are supported - "Binary" and "OCL2.0"Retrieves the appropriate evaluator, which knows how to evaluate expressions of the given languagestatic EvaluationConfigurator
Retrieves configurator singletonvoid
Method allows registering additional class loaders, to load classes, implementing binary expressions.void
registerEvaluator
(String language, Evaluator evaluator) Registers evaluator for the specified language.void
unregisterEvaluator
(String language) Unregisters evaluator for the specified language.
-
Constructor Details
-
EvaluationConfigurator
protected EvaluationConfigurator()
-
-
Method Details
-
getInstance
Retrieves configurator singleton- Returns:
- configurator singleton
-
getAvailableLanguages
Enumerates available evaluatable languages for opaque expressions Currently (as of v12.5) 2 languages are supported - "Binary" and "OCL2.0"- Returns:
- set of the available languages (strings)
-
getEvaluatorForLanguage
Retrieves the appropriate evaluator, which knows how to evaluate expressions of the given language- Parameters:
lang
- one of the evaluatable languages- Returns:
- evaluator object, suitable for expression evaluation or null if language is not evaluatable
- See Also:
-
registerBinaryImplementers
Method allows registering additional class loaders, to load classes, implementing binary expressions. This is especially necessary for expression implementations, coming from plugins (otherwise these implementation classes will not be found - since they are in a separate class loader - plugin class loader).- Parameters:
cl
- class loader, supplying additional classes, implementing expressions
-
registerEvaluator
Registers evaluator for the specified language.- Parameters:
language
- language identifier.evaluator
- an evaluator object.
-
unregisterEvaluator
Unregisters evaluator for the specified language.- Parameters:
language
- language identifier.
-