接口 Decorator<T>

所有已知子接口:
TaskDecorator
所有已知实现类:
CompositeTaskDecorator, ContextPropagatingTaskDecorator

public interface Decorator<T>
A callback interface for a decorator to be applied to any T
从以下版本开始:
4.0 2023/10/12 21:26
作者:
Harry Yang
  • 方法概要

    修饰符和类型
    方法
    说明
    default Decorator<T>
    andThen(Decorator<T> decorator)
    call it after this decoration
    decorate(T delegate)
    Decorate the given delegate, returning a potentially wrapped delegate for actual execution, internally delegating to the original methods implementation.
  • 方法详细资料

    • decorate

      T decorate(T delegate)
      Decorate the given delegate, returning a potentially wrapped delegate for actual execution, internally delegating to the original methods implementation.
      参数:
      delegate - the original delegate
      返回:
      the decorated object
    • andThen

      default Decorator<T> andThen(Decorator<T> decorator)
      call it after this decoration