Class SpringExpressionConsumer<T>

  • Type Parameters:
    T - type of input
    All Implemented Interfaces:
    Consumer<T>

    public class SpringExpressionConsumer<T>
    extends AbstractSpringExpressionEvaluatorEx
    implements Consumer<T>
    Predicate whose condition is defined by an Spring EL expression.
    Since:
    6.1.0
    • Field Detail

      • log

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

        @Nullable
        private Class<T> inputTypeClass
        Input type.
    • Constructor Detail

      • SpringExpressionConsumer

        public SpringExpressionConsumer​(@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
        Since:
        6.1.0
      • setInputType

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

        public void accept​(@Nullable
                           T input)
        Specified by:
        accept in interface Consumer<T>