Class SpringExpressionFunction<T,​U>

  • Type Parameters:
    T - type of input
    U - type of output
    All Implemented Interfaces:
    Function<T,​U>

    public class SpringExpressionFunction<T,​U>
    extends AbstractSpringExpressionEvaluatorEx
    implements Function<T,​U>
    Function whose output is defined by an Spring EL expression.
    Since:
    5.4.0
    • Field Detail

      • log

        @Nonnull
        private final org.slf4j.Logger log
        Class logger.
      • inputType

        @Nullable
        private Class<T> inputType
        The input type.
    • Constructor Detail

      • SpringExpressionFunction

        public SpringExpressionFunction​(@Nonnull @NotEmpty @ParameterName(name="expression")
                                        String expression)
        Constructor.
        Parameters:
        expression - the expression to evaluate
    • Method Detail

      • getInputType

        @Nullable
        public Class<T> getInputType()
        Get the input type to be enforced.
        Returns:
        input type
      • setInputType

        public void setInputType​(@Nullable
                                 Class<T> type)
        Set the input type to be enforced.
        Parameters:
        type - input type
      • apply

        public U apply​(@Nullable
                       T input)
        Specified by:
        apply in interface Function<T,​U>