Class EvaluationConfigurator

java.lang.Object
com.nomagic.magicdraw.evaluation.EvaluationConfigurator

@OpenApiAll public class EvaluationConfigurator extends Object
This is an open api class for accessing opaque expression evaluators (for further configuring purposes).
See Also:
  • Constructor Details

    • EvaluationConfigurator

      protected EvaluationConfigurator()
  • Method Details

    • getInstance

      public static EvaluationConfigurator getInstance()
      Retrieves configurator singleton
      Returns:
      configurator singleton
    • getAvailableLanguages

      public Set<String> 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

      public Evaluator getEvaluatorForLanguage(String lang)
      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

      public void registerBinaryImplementers(ClassLoader cl)
      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

      public void registerEvaluator(String language, Evaluator evaluator)
      Registers evaluator for the specified language.
      Parameters:
      language - language identifier.
      evaluator - an evaluator object.
    • unregisterEvaluator

      public void unregisterEvaluator(String language)
      Unregisters evaluator for the specified language.
      Parameters:
      language - language identifier.