Class ClassLoaderDecorator.NoOp
java.lang.Object
net.bytebuddy.dynamic.loading.ClassLoaderDecorator.NoOp
- All Implemented Interfaces:
ClassLoaderDecorator
- Enclosing interface:
ClassLoaderDecorator
@Enhance
public static class ClassLoaderDecorator.NoOp
extends Object
implements ClassLoaderDecorator
A no-operation implementation of a class loader decorator that always returns the same class loader
without applying any decoration.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ClassLoaderDecorator
ClassLoaderDecorator.Factory, ClassLoaderDecorator.NoOp -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassLoaderThe class loader to return for all type descriptions ornullfor the bootstrap class loader. -
Constructor Summary
ConstructorsConstructorDescriptionNoOp(ClassLoader classLoader) Creates a new no-operation class loader decorator. -
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.
-
Field Details
-
classLoader
The class loader to return for all type descriptions ornullfor the bootstrap class loader.
-
-
Constructor Details
-
NoOp
Creates a new no-operation class loader decorator.- Parameters:
classLoader- The class loader to return for all type descriptions ornullfor the bootstrap class loader.
-
-
Method Details
-
isSkipped
Determines if a type should be skipped from class loader decoration.- Specified by:
isSkippedin interfaceClassLoaderDecorator- 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.- Specified by:
applyin interfaceClassLoaderDecorator- 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.
-