Class EvaluationConfigurator


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

      • EvaluationConfigurator

        protected EvaluationConfigurator()
    • Method Detail

      • getInstance

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

        public java.util.Set<java.lang.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​(java.lang.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:
        Evaluator
      • registerBinaryImplementers

        public void registerBinaryImplementers​(java.lang.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​(java.lang.String language,
                                      Evaluator evaluator)
        Registers evaluator for the specified language.
        Parameters:
        language - language identifier.
        evaluator - an evaluator object.
      • unregisterEvaluator

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