Package net.bytebuddy.dynamic
Interface ClassFileLocator.AgentBased.ClassLoadingDelegate
-
- All Known Implementing Classes:
ClassFileLocator.AgentBased.ClassLoadingDelegate.Default
,ClassFileLocator.AgentBased.ClassLoadingDelegate.Explicit
,ClassFileLocator.AgentBased.ClassLoadingDelegate.ForDelegatingClassLoader
- Enclosing class:
- ClassFileLocator.AgentBased
public static interface ClassFileLocator.AgentBased.ClassLoadingDelegate
A delegate that is queried for loading a class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ClassFileLocator.AgentBased.ClassLoadingDelegate.Default
A default implementation of a class loading delegate.static class
ClassFileLocator.AgentBased.ClassLoadingDelegate.Explicit
A class loading delegate that allows the location of explicitly registered classes that cannot be located by a class loader directly.static class
ClassFileLocator.AgentBased.ClassLoadingDelegate.ForDelegatingClassLoader
A class loading delegate that accounts for asun.reflect.DelegatingClassLoader
which cannot load its own classes by name.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ClassLoader
getClassLoader()
Returns the underlying class loader.java.lang.Class<?>
locate(java.lang.String name)
Loads a class by its name.
-
-
-
Method Detail
-
locate
java.lang.Class<?> locate(java.lang.String name) throws java.lang.ClassNotFoundException
Loads a class by its name.- Parameters:
name
- The name of the type.- Returns:
- The class with the given name.
- Throws:
java.lang.ClassNotFoundException
- If a class cannot be found.
-
getClassLoader
java.lang.ClassLoader getClassLoader()
Returns the underlying class loader.- Returns:
- The underlying class loader.
-
-