Class VilExpressionParser

    • Constructor Detail

      • VilExpressionParser

        public VilExpressionParser()
    • Method Detail

      • register

        public static VilExpressionParser register()
        Registers the expression parser in case that VIL shall be used without Eclipse-DS initialization. Do not call this method within Eclipse.
        Returns:
        the registered instance (for unregister(VilExpressionParser))
      • unregister

        public static void unregister​(VilExpressionParser parser)
        Unregisters the parser obtained from register().
        Parameters:
        parser - the parser to unregister
      • activate

        protected void activate​(org.osgi.service.component.ComponentContext context)
        Private method to activate plugin.
        Parameters:
        context - Context.
      • deactivate

        protected void deactivate​(org.osgi.service.component.ComponentContext context)
        Private method to to de-activate plugin.
        Parameters:
        context - Context.
      • parse

        public Expression parse​(java.lang.String text,
                                IRuntimeEnvironment environment)
                         throws VilException
        Description copied from interface: IExpressionParser
        Parses the given text into an expression. Resolution will happen in a separate resolver instance.
        Specified by:
        parse in interface IExpressionParser<Resolver>
        Parameters:
        text - the text to be parsed
        environment - the runtime environment used to resolve variables
        Returns:
        the parsed expression
        Throws:
        VilException - in case of parse problems
      • parse

        public Expression parse​(java.lang.String text,
                                Resolver resolver)
                         throws VilException
        Description copied from interface: IExpressionParser
        Parses the given text into an expression. Resolution will happen in the given resolver instance.
        Specified by:
        parse in interface IExpressionParser<Resolver>
        Parameters:
        text - the text to be parsed
        resolver - a resolver instance providing a parse environment consisting of variables
        Returns:
        the parsed expression
        Throws:
        VilException - in case of parse problems