Top Description Fields Constructors Methods
org.springframework.expression.spel.support

public Class StandardOperatorOverloader

extends Object
implements OperatorOverloader
Class Inheritance
All Implemented Interfaces
org.springframework.expression.OperatorOverloader
Imports
org.springframework.expression.EvaluationException, .Operation, .OperatorOverloader, org.springframework.lang.Nullable

Standard implementation of OperatorOverloader.
Author
Juergen Hoeller
Since
3.0

Field Summary

Modifier and TypeField and Description
pack-priv static final StandardOperatorOverloader

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
operate(Operation
the operation to be performed
operation
,
Object
the left operand
leftOperand
,
Object
the right operand
rightOperand
)

Implements org.springframework.expression.OperatorOverloader.operate.

Perform the specified operation on the two operands, returning a result.

public boolean
overridesOperation(Operation
the operation to be performed
operation
,
Object
the left operand
leftOperand
,
Object
the right operand
rightOperand
)

Implements org.springframework.expression.OperatorOverloader.overridesOperation.

Return true if this operator overloader supports the specified operation on the two operands and should be invoked to handle it.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final StandardOperatorOverloader INSTANCE

Constructor Detail

StandardOperatorOverloaderback to summary
public StandardOperatorOverloader()

Method Detail

operateback to summary
public Object operate(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException

Implements org.springframework.expression.OperatorOverloader.operate.

Doc from org.springframework.expression.OperatorOverloader.operate.

Perform the specified operation on the two operands, returning a result.

See Operation for supported operations.

Parameters
operation:Operation

the operation to be performed

leftOperand:Object

the left operand

rightOperand:Object

the right operand

Returns:Object

the result of performing the operation on the two operands

Annotations
@Override
Exceptions
EvaluationException:
if there is a problem performing the operation
overridesOperationback to summary
public boolean overridesOperation(Operation operation, Object leftOperand, Object rightOperand) throws EvaluationException

Implements org.springframework.expression.OperatorOverloader.overridesOperation.

Doc from org.springframework.expression.OperatorOverloader.overridesOperation.

Return true if this operator overloader supports the specified operation on the two operands and should be invoked to handle it.

Parameters
operation:Operation

the operation to be performed

leftOperand:Object

the left operand

rightOperand:Object

the right operand

Returns:boolean

true if this OperatorOverloader supports the specified operation between the two operands

Annotations
@Override
Exceptions
EvaluationException:
if there is a problem performing the operation