Class OperatorInstanceof

  extended by org.antlr.runtime.tree.BaseTree
      extended by org.antlr.runtime.tree.CommonTree
          extended by org.springframework.expression.spel.ast.SpelNode
              extended by org.springframework.expression.spel.ast.Operator
                  extended by org.springframework.expression.spel.ast.OperatorInstanceof
All Implemented Interfaces:, org.antlr.runtime.tree.Tree

public class OperatorInstanceof
extends Operator

The operator 'instanceof' checks if an object is of the class specified in the right hand operand, in the same way that instanceof does in Java.

Andy Clement
See Also:
Serialized Form

Field Summary
Fields inherited from class org.antlr.runtime.tree.CommonTree
startIndex, stopIndex, token
Fields inherited from class org.antlr.runtime.tree.BaseTree
Fields inherited from interface org.antlr.runtime.tree.Tree
Constructor Summary
OperatorInstanceof(org.antlr.runtime.Token payload)
Method Summary
 java.lang.String getOperatorName()
 java.lang.Boolean getValue(ExpressionState state)
          Compare the left operand to see it is an instance of the type specified as the right operand.
Methods inherited from class org.springframework.expression.spel.ast.Operator
getLeftOperand, getRightOperand, isWritable, toStringAST
Methods inherited from class org.springframework.expression.spel.ast.SpelNode
getChild, getObjectClass, getTokenName, getValue, setValue
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getLine, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setTokenStartIndex, setTokenStopIndex, toString
Methods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, dupTree, getChildCount, getFirstChildWithType, setChild, toStringTree
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public OperatorInstanceof(org.antlr.runtime.Token payload)
Method Detail


public java.lang.String getOperatorName()
Specified by:
getOperatorName in class Operator


public java.lang.Boolean getValue(ExpressionState state)
                           throws EvaluationException
Compare the left operand to see it is an instance of the type specified as the right operand. The right operand must be a class.

Specified by:
getValue in class SpelNode
state - the expression state
true if the left operand is an instanceof of the right operand, otherwise false
EvaluationException - if there is a problem evaluating the expression