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 Summary
Modifier and TypeMethodDescriptioncustomizeLoading
(@NonNull Supplier<Class<T>> loader) Run the specified loader in a customized environment.generateClass
(BindingClassLoader loader, String fqcn, Class<?> bindingInterface) Generate a class.
-
Method Details
-
generateClass
BindingClassLoader.GeneratorResult<T> generateClass(BindingClassLoader loader, String fqcn, Class<?> bindingInterface) Generate a class.- Parameters:
fqcn
- Generated class Fully-qualified class namebindingInterface
- Binding interface for which the class is being generated- Returns:
- A result.
-
customizeLoading
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
-