Interface ClassLoaderDecorator
- All Known Implementing Classes:
ClassLoaderDecorator.NoOp, ModuleLayerFromSingleClassLoaderDecorator
public interface ClassLoaderDecorator
A class loader decorator allows for the decoration of class loaders that are created by a
ClassLoadingStrategy.
This way, it is possible to define custom class loaders that wrap Byte Buddy's built-in class loaders.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA factory for creating class loader decorators.static classA no-operation implementation of a class loader decorator that always returns the same class loader without applying any decoration. -
Method Summary
Modifier and TypeMethodDescriptionapply(TypeDescription typeDescription) Applies this decorator to resolve a class loader for the given type.booleanisSkipped(TypeDescription typeDescription) Determines if a type should be skipped from class loader decoration.
-
Method Details
-
isSkipped
Determines if a type should be skipped from class loader decoration.- Parameters:
typeDescription- The type description to check.- Returns:
trueif the type should be skipped from decoration.
-
apply
Applies this decorator to resolve a class loader for the given type.- Parameters:
typeDescription- The type description for which to resolve a class loader.- Returns:
- The class loader to use for the given type or
nullfor the bootstrap class loader.
-