Class Operator

    • Field Detail

      • leftActualDescriptor

        protected java.lang.String leftActualDescriptor
      • rightActualDescriptor

        protected java.lang.String rightActualDescriptor
    • Constructor Detail

      • Operator

        public Operator(java.lang.String payload,
                        int pos,
                        SpelNodeImpl... operands)
    • Method Detail

      • getOperatorName

        public final java.lang.String getOperatorName()
      • toStringAST

        public java.lang.String toStringAST()
        String format for all operators is the same '(' [operand] [operator] [operand] ')'.
        the string form
      • isCompilableOperatorUsingNumerics

        protected boolean isCompilableOperatorUsingNumerics()
      • generateComparisonCode

        protected void generateComparisonCode(MethodVisitor mv,
                                              CodeFlow cf,
                                              int compInstruction1,
                                              int compInstruction2)
        Numeric comparison operators share very similar generated code, only differing in two comparison instructions.
      • equalityCheck

        public static boolean equalityCheck(EvaluationContext context,
                                            java.lang.Object left,
                                            java.lang.Object right)
        Perform an equality check for the given operand values.

        This method is not just used for reflective comparisons in subclasses but also from compiled expression code, which is why it needs to be declared as public static here.

        context - the current evaluation context
        left - the left-hand operand value
        right - the right-hand operand value