public class

OperatorInstanceof

extends Operator
java.lang.Object
   ↳ org.springframework.expression.spel.ast.SpelNodeImpl
     ↳ org.springframework.expression.spel.ast.Operator
       ↳ org.springframework.expression.spel.ast.OperatorInstanceof

Class Overview

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.

Summary

[Expand]
Inherited Fields
From class org.springframework.expression.spel.ast.SpelNodeImpl
Public Constructors
OperatorInstanceof(int pos, SpelNodeImpl... operands)
Public Methods
BooleanTypedValue getValueInternal(ExpressionState state)
Compare the left operand to see it is an instance of the type specified as the right operand.
[Expand]
Inherited Methods
From class org.springframework.expression.spel.ast.Operator
From class org.springframework.expression.spel.ast.SpelNodeImpl
From class java.lang.Object
From interface org.springframework.expression.spel.SpelNode

Public Constructors

public OperatorInstanceof (int pos, SpelNodeImpl... operands)

Public Methods

public BooleanTypedValue getValueInternal (ExpressionState state)

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.

Parameters
state the expression state
Returns
  • true if the left operand is an instanceof of the right operand, otherwise false
Throws
EvaluationException if there is a problem evaluating the expression