接口 ContextConsumer<C extends ApplicationContext>

类型参数:
C - the application context type
函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@FunctionalInterface public interface ContextConsumer<C extends ApplicationContext>
Callback interface used to process an ApplicationContext with the ability to throw a (checked) exception.
从以下版本开始:
2.0.0
作者:
Stephane Nicoll, Andy Wilkinson
另请参阅:
  • 方法概要

    修饰符和类型
    方法
    说明
    void
    accept(C context)
    Performs this operation on the supplied context.
    andThen(ContextConsumer<? super C> after)
    Returns a composed ContextConsumer that performs, in sequence, this operation followed by the after operation.
  • 方法详细资料

    • accept

      void accept(C context) throws Throwable
      Performs this operation on the supplied context.
      参数:
      context - the application context to consume
      抛出:
      Throwable - any exception that might occur in assertions
    • andThen

      default ContextConsumer<C> andThen(ContextConsumer<? super C> after)
      Returns a composed ContextConsumer that performs, in sequence, this operation followed by the after operation.
      参数:
      after - the operation to perform after this operation
      返回:
      a composed ContextConsumer that performs in sequence this operation followed by the after operation
      从以下版本开始:
      2.6.0