Interface VariableResolverFactory

    • Method Detail

      • createVariable

        VariableResolver createVariable​(java.lang.String name,
                                        java.lang.Object value)
        Creates a new variable. This probably doesn't need to be implemented in most scenarios. This is used for variable assignment.
        Parameters:
        name - - name of the variable being created
        value - - value of the variable
        Returns:
        instance of the variable resolver associated with the variable
      • createIndexedVariable

        VariableResolver createIndexedVariable​(int index,
                                               java.lang.String name,
                                               java.lang.Object value)
      • createVariable

        VariableResolver createVariable​(java.lang.String name,
                                        java.lang.Object value,
                                        java.lang.Class<?> type)
        Creates a new variable, and assigns a static type. It is expected the underlying factory and resolver will enforce this.
        Parameters:
        name - - name of the variable being created
        value - - value of the variable
        type - - the static type
        Returns:
        instance of the variable resolver associated with the variable
      • createIndexedVariable

        VariableResolver createIndexedVariable​(int index,
                                               java.lang.String name,
                                               java.lang.Object value,
                                               java.lang.Class<?> typee)
      • getNextFactory

        VariableResolverFactory getNextFactory()
        Returns the next factory in the factory chain. MVEL uses a hierarchical variable resolution strategy, much in the same way as Classloaders in Java. For performance reasons, it is the responsibility of the individual VariableResolverFactory to pass off to the next one.
        Returns:
        instance of the next factory - null if none.
      • setNextFactory

        VariableResolverFactory setNextFactory​(VariableResolverFactory resolverFactory)
        Sets the next factory in the chain. Proper implementation: return this.nextFactory = resolverFactory;
        Parameters:
        resolverFactory - - instance of next resolver factory
        Returns:
        - instance of next resolver factory
      • getVariableResolver

        VariableResolver getVariableResolver​(java.lang.String name)
        Return a variable resolver for the specified variable name. This method is expected to traverse the heirarchy of ResolverFactories.
        Parameters:
        name - - variable name
        Returns:
        - instance of the VariableResolver for the specified variable
      • getIndexedVariableResolver

        VariableResolver getIndexedVariableResolver​(int index)
      • isTarget

        boolean isTarget​(java.lang.String name)
        Deterimines whether or not the current VariableResolverFactory is the physical target for the actual variable.
        Parameters:
        name - - variable name
        Returns:
        - boolean indicating whether or not factory is the physical target
      • isResolveable

        boolean isResolveable​(java.lang.String name)
        Determines whether or not the variable is resolver in the chain of factories.
        Parameters:
        name - - variable name
        Returns:
        - boolean
      • getKnownVariables

        java.util.Set<java.lang.String> getKnownVariables()
        Return a list of known variables inside the factory. This method should not recurse into other factories. But rather return only the variables living inside this factory.
        Returns:
        variables
      • variableIndexOf

        int variableIndexOf​(java.lang.String name)
      • isIndexedFactory

        boolean isIndexedFactory()
      • tiltFlag

        boolean tiltFlag()
      • setTiltFlag

        void setTiltFlag​(boolean tilt)