Package net.bytebuddy.dynamic.loading
Interface ClassLoaderDecorator
-
- All Known Implementing Classes:
ClassLoaderDecorator.NoOp,ModuleLayerFromSingleClassLoaderDecorator
public interface ClassLoaderDecoratorA class loader decorator allows for the decoration of class loaders that are created by aClassLoadingStrategy. This way, it is possible to define custom class loaders that wrap Byte Buddy's built-in class loaders.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceClassLoaderDecorator.FactoryA factory for creating class loader decorators.static classClassLoaderDecorator.NoOpA no-operation implementation of a class loader decorator that always returns the same class loader without applying any decoration.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ClassLoaderapply(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 Detail
-
isSkipped
boolean isSkipped(TypeDescription typeDescription)
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
@MaybeNull java.lang.ClassLoader apply(TypeDescription typeDescription)
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.
-
-