类 LambdaSafe.LambdaSafeCallback<C,A,SELF extends LambdaSafe.LambdaSafeCallback<C,A,SELF>>

java.lang.Object
cn.taketoday.util.LambdaSafe.LambdaSafeCallback<C,A,SELF>
类型参数:
C - the callback type
A - the primary argument type
SELF - the self class reference
直接已知子类:
LambdaSafe.Callback, LambdaSafe.Callbacks
封闭类:
LambdaSafe

protected abstract static class LambdaSafe.LambdaSafeCallback<C,A,SELF extends LambdaSafe.LambdaSafeCallback<C,A,SELF>> extends Object
Abstract base class for lambda safe callbacks.
  • 字段详细资料

    • log

      private Logger log
    • argument

      private final A argument
    • callbackType

      private final Class<C> callbackType
    • additionalArguments

      private final Object[] additionalArguments
    • filter

      private LambdaSafe.Filter<C,A> filter
  • 构造器详细资料

    • LambdaSafeCallback

      LambdaSafeCallback(Class<C> callbackType, A argument, Object[] additionalArguments)
  • 方法详细资料

    • withLogger

      public SELF withLogger(Class<?> loggerSource)
      Use the specified logger source to report any lambda failures.
      参数:
      loggerSource - the logger source to use
      返回:
      this instance
    • withLogger

      public SELF withLogger(Logger logger)
      Use the specified logger to report any lambda failures.
      参数:
      logger - the logger to use
      返回:
      this instance
    • withFilter

      SELF withFilter(LambdaSafe.Filter<C,A> filter)
      Use a specific filter to determine when a callback should apply. If no explicit filter is set filter will be attempted using the generic type on the callback type.
      参数:
      filter - the filter to use
      返回:
      this instance
    • invoke

      protected final <R> LambdaSafe.InvocationResult<R> invoke(C callbackInstance, Supplier<R> supplier)
    • isLambdaGenericProblem

      private boolean isLambdaGenericProblem(ClassCastException ex)
    • startsWithArgumentClassName

      private boolean startsWithArgumentClassName(String message)
    • startsWithArgumentClassName

      private boolean startsWithArgumentClassName(String message, Object argument)
    • logNonMatchingType

      private void logNonMatchingType(C callback, ClassCastException ex)
    • self

      private SELF self()