Package org.mvel2

Class MVELInterpretedRuntime

  • All Implemented Interfaces:
    java.io.Serializable, Parser

    public class MVELInterpretedRuntime
    extends AbstractParser
    The MVEL interpreted runtime, used for fast parse and execution of scripts.
    See Also:
    Serialized Form
    • Field Detail

      • LOG

        private static final java.util.logging.Logger LOG
      • holdOverRegister

        private java.lang.Object holdOverRegister
    • Constructor Detail

      • MVELInterpretedRuntime

        MVELInterpretedRuntime​(char[] expression,
                               java.lang.Object ctx,
                               java.util.Map<java.lang.String,​java.lang.Object> variables)
      • MVELInterpretedRuntime

        MVELInterpretedRuntime​(char[] expression,
                               java.lang.Object ctx)
      • MVELInterpretedRuntime

        MVELInterpretedRuntime​(java.lang.String expression)
      • MVELInterpretedRuntime

        MVELInterpretedRuntime​(char[] expression)
      • MVELInterpretedRuntime

        public MVELInterpretedRuntime​(char[] expr,
                                      java.lang.Object ctx,
                                      VariableResolverFactory resolverFactory)
      • MVELInterpretedRuntime

        public MVELInterpretedRuntime​(char[] expr,
                                      int start,
                                      int offset,
                                      java.lang.Object ctx,
                                      VariableResolverFactory resolverFactory)
      • MVELInterpretedRuntime

        public MVELInterpretedRuntime​(char[] expr,
                                      int start,
                                      int offset,
                                      java.lang.Object ctx,
                                      VariableResolverFactory resolverFactory,
                                      ParserContext pCtx)
      • MVELInterpretedRuntime

        public MVELInterpretedRuntime​(java.lang.String expression,
                                      java.lang.Object ctx,
                                      VariableResolverFactory resolverFactory)
      • MVELInterpretedRuntime

        MVELInterpretedRuntime​(java.lang.String expression,
                               VariableResolverFactory resolverFactory)
      • MVELInterpretedRuntime

        MVELInterpretedRuntime​(java.lang.String expression,
                               java.lang.Object ctx)
    • Method Detail

      • parse

        public java.lang.Object parse()
      • parseAndExecuteInterpreted

        private java.lang.Object parseAndExecuteInterpreted()
        Main interpreter loop.
        Returns:
        value
      • procBooleanOperator

        private int procBooleanOperator​(int operator)
      • reduceRight

        private void reduceRight()
        This method peforms the equivilent of an XSWAP operation to flip the operator over to the top of the stack, and loads the stored values on the d-stack onto the main program stack.
      • hasMore

        private boolean hasMore()
      • unwindStatement

        private boolean unwindStatement​(int operator)
        This method is called to unwind the current statement without any reduction or further parsing.
        Parameters:
        operator - -
        Returns:
        -