接口 SpelNode

    • 方法详细资料

      • getValue

        Object getValue​(ExpressionState expressionState)
                 throws EvaluationException
        Evaluate the expression node in the context of the supplied expression state and return the value.
        参数:
        expressionState - the current expression state (includes the context)
        返回:
        the value of this node evaluated against the specified state
        抛出:
        EvaluationException
      • getTypedValue

        TypedValue getTypedValue​(ExpressionState expressionState)
                          throws EvaluationException
        Evaluate the expression node in the context of the supplied expression state and return the typed value.
        参数:
        expressionState - the current expression state (includes the context)
        返回:
        the type value of this node evaluated against the specified state
        抛出:
        EvaluationException
      • isWritable

        boolean isWritable​(ExpressionState expressionState)
                    throws EvaluationException
        Determine if this expression node will support a setValue() call.
        参数:
        expressionState - the current expression state (includes the context)
        返回:
        true if the expression node will allow setValue()
        抛出:
        EvaluationException - if something went wrong trying to determine if the node supports writing
      • setValue

        void setValue​(ExpressionState expressionState,
                      Object newValue)
               throws EvaluationException
        Evaluate the expression to a node and then set the new value on that node. For example, if the expression evaluates to a property reference, then the property will be set to the new value.
        参数:
        expressionState - the current expression state (includes the context)
        newValue - the new value
        抛出:
        EvaluationException - if any problem occurs evaluating the expression or setting the new value
      • getChildCount

        int getChildCount()
        返回:
        the number of children under this node
      • getChild

        SpelNode getChild​(int index)
        Helper method that returns a SpelNode rather than an Antlr Tree node.
        返回:
        the child node cast to a SpelNode
      • getObjectClass

        Class<?> getObjectClass​(Object obj)
        Determine the class of the object passed in, unless it is already a class object.
        参数:
        obj - the object that the caller wants the class of
        返回:
        the class of the object if it is not already a class object, or null if the object is null
      • getStartPosition

        int getStartPosition()
        返回:
        the start position of this Ast node in the expression string
      • getEndPosition

        int getEndPosition()
        返回:
        the end position of this Ast node in the expression string