Package net.bytebuddy.dynamic
Class ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.Default
java.lang.Object
net.bytebuddy.dynamic.ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.Default
- All Implemented Interfaces:
ClassFileLocator.ForInstrumentation.ClassLoadingDelegate
- Direct Known Subclasses:
ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.ForDelegatingClassLoader
- Enclosing interface:
- ClassFileLocator.ForInstrumentation.ClassLoadingDelegate
@Enhance
public static class ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.Default
extends Object
implements ClassFileLocator.ForInstrumentation.ClassLoadingDelegate
A default implementation of a class loading delegate.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.ClassFileLocator.ForInstrumentation.ClassLoadingDelegate
ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.Default, ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.Explicit, ClassFileLocator.ForInstrumentation.ClassLoadingDelegate.ForDelegatingClassLoader
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default
(ClassLoader classLoader) Creates a default class loading delegate. -
Method Summary
Modifier and TypeMethodDescriptionReturns the underlying class loader.Class<?>
Loads a class by its name.of
(ClassLoader classLoader) Creates a class loading delegate for the given class loader.
-
Field Details
-
classLoader
The underlying class loader.
-
-
Constructor Details
-
Default
Creates a default class loading delegate.- Parameters:
classLoader
- The class loader to be queried.
-
-
Method Details
-
of
Creates a class loading delegate for the given class loader.- Parameters:
classLoader
- The class loader for which to create a delegate.- Returns:
- The class loading delegate for the provided class loader.
-
locate
Loads a class by its name.- Specified by:
locate
in interfaceClassFileLocator.ForInstrumentation.ClassLoadingDelegate
- Parameters:
name
- The name of the type.- Returns:
- The class with the given name.
- Throws:
ClassNotFoundException
- If a class cannot be found.
-
getClassLoader
Returns the underlying class loader.- Specified by:
getClassLoader
in interfaceClassFileLocator.ForInstrumentation.ClassLoadingDelegate
- Returns:
- The underlying class loader.
-