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
 
Fields inherited from class org.springframework.expression.spel.ast.SpelNodeImpl
children, pos
 
Constructor Summary
Operator(String payload, int pos, SpelNodeImpl... operands)
           
 
Method Summary
 SpelNodeImpl getLeftOperand()
           
 String getOperatorName()
           
 SpelNodeImpl getRightOperand()
           
 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, getValue, getValue, getValueInternal, isWritable, nextChildIs, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Operator

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

getLeftOperand

public SpelNodeImpl getLeftOperand()

getRightOperand

public SpelNodeImpl getRightOperand()

getOperatorName

public final String getOperatorName()

toStringAST

public 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