Interface ThrowingCustomizer<T>

Type Parameters:
T - The type of input.
All Superinterfaces:
Customizer<T>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ThrowingCustomizer<T> extends Customizer<T>
A Customizer that allows invocation of code that throws a checked exception.
  • Method Details

    • customize

      default void customize(T t)
      Default Customizer.customize(Object) that wraps any thrown checked exceptions (by default in a RuntimeException).
      Specified by:
      customize in interface Customizer<T>
      Parameters:
      t - the object to customize
    • customizeWithException

      void customizeWithException(T t) throws Exception
      Performs the customization on the given object, possibly throwing a checked exception.
      Parameters:
      t - the object to customize
      Throws:
      Exception - on error