org.springframework.expression.spel.ast
Class Operator

java.lang.Object
  extended by org.springframework.expression.spel.ast.SpelNodeImpl
      extended by org.springframework.expression.spel.ast.Operator
All Implemented Interfaces:
SpelNode
Direct Known Subclasses:
OpAnd, OpDivide, OpEQ, OperatorBetween, OperatorInstanceof, OperatorMatches, OperatorPower, OpGE, OpGT, OpLE, OpLT, OpMinus, OpModulus, OpMultiply, OpNE, OpOr, OpPlus

public abstract class Operator
extends SpelNodeImpl

Common supertype for operators that operate on either one or two operands. In the case of multiply or divide there would be two operands, but for unary plus or minus, there is only one.

Since:
3.0
Author:
Andy Clement

Field Summary
(package private)  java.lang.String operatorName
           
 
Fields inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
children, pos
 
Constructor Summary
Operator(java.lang.String payload, int pos, SpelNodeImpl... operands)
           
 
Method Summary
 SpelNodeImpl getLeftOperand()
           
 java.lang.String getOperatorName()
           
 SpelNodeImpl getRightOperand()
           
 java.lang.String toStringAST()
          String format for all operators is the same '(' [operand] [operator] [operand] ')'
 
Methods inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
getChild, getChildCount, getEndPosition, getObjectClass, getPreviousChild, getStartPosition, getTypedValue, getValue, getValue, getValueInternal, isWritable, nextChildIs, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operatorName

java.lang.String operatorName
Constructor Detail

Operator

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

getLeftOperand

public SpelNodeImpl getLeftOperand()

getRightOperand

public SpelNodeImpl getRightOperand()

getOperatorName

public final java.lang.String getOperatorName()

toStringAST

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

Specified by:
toStringAST in interface SpelNode
Specified by:
toStringAST in class SpelNodeImpl
Returns:
the string form of this AST node