Class SpringExpressionBiFunction<T,U,V>
java.lang.Object
net.shibboleth.shared.spring.expression.AbstractSpringExpressionEvaluator
net.shibboleth.shared.spring.expression.SpringExpressionBiFunction<T,U,V>
- Type Parameters:
T- first input typeU- second input typeV- return type
- All Implemented Interfaces:
BiFunction<T,U, V>
public class SpringExpressionBiFunction<T,U,V>
extends AbstractSpringExpressionEvaluator
implements BiFunction<T,U,V>
Predicate whose condition is defined by an Spring EL expression.
- Since:
- 6.1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the input type to be enforced.protected voidprepareContext(EvaluationContext context, Object... input) Pre-process the script context before execution.voidSet the input types to be enforced.voidsetOutputType(Class<?> type) Set the output type to be enforced.voidsetReturnOnError(Object value) Set value to return if an error occurs.Methods inherited from class net.shibboleth.shared.spring.expression.AbstractSpringExpressionEvaluator
evaluate, getCustomObject, getOutputType, getReturnOnError, setCustomObject, setHideExceptionsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logClass logger. -
inputTypes
Input types.
-
-
Constructor Details
-
SpringExpressionBiFunction
public SpringExpressionBiFunction(@Nonnull @NotEmpty @ParameterName(name="expression") String expression) Constructor.- Parameters:
expression- the expression to evaluate
-
-
Method Details
-
getInputTypes
Get the input type to be enforced.- Returns:
- input type
-
setOutputType
Set the output type to be enforced.- Overrides:
setOutputTypein classAbstractSpringExpressionEvaluator- Parameters:
type- output type
-
setReturnOnError
Set value to return if an error occurs.- Overrides:
setReturnOnErrorin classAbstractSpringExpressionEvaluator- Parameters:
value- value to return
-
apply
- Specified by:
applyin interfaceBiFunction<T,U, V>
-
prepareContext
Pre-process the script context before execution.- Specified by:
prepareContextin classAbstractSpringExpressionEvaluator- Parameters:
context- the expression contextinput- the inputs
-