Interface BindingClassLoader.ClassGenerator<T>

Type Parameters:
T - Type of generated class
Enclosing class:
BindingClassLoader

public static interface BindingClassLoader.ClassGenerator<T>
A class generator, generating a class of a particular type.
  • Method Details

    • generateClass

      BindingClassLoader.GeneratorResult<T> generateClass(BindingClassLoader loader, String fqcn, Class<?> bindingInterface)
      Generate a class.
      Parameters:
      fqcn - Generated class Fully-qualified class name
      bindingInterface - Binding interface for which the class is being generated
      Returns:
      A result.
    • customizeLoading

      default Class<T> customizeLoading(@NonNull Supplier<Class<T>> loader)
      Run the specified loader in a customized environment. The environment customizations must be cleaned up by the time this method returns. The default implementation performs no customization.
      Parameters:
      loader - Class loader to execute
      Returns:
      Class returned by the loader