Package net.bytebuddy.agent.builder
Class AgentBuilder.DescriptionStrategy.SuperTypeLoading.Asynchronous.ThreadSwitchingClassLoadingDelegate
java.lang.Object
net.bytebuddy.agent.builder.AgentBuilder.DescriptionStrategy.SuperTypeLoading.Asynchronous.ThreadSwitchingClassLoadingDelegate
- All Implemented Interfaces:
TypeDescription.SuperTypeLoading.ClassLoadingDelegate
- Enclosing class:
AgentBuilder.DescriptionStrategy.SuperTypeLoading.Asynchronous
@Enhance
protected static class AgentBuilder.DescriptionStrategy.SuperTypeLoading.Asynchronous.ThreadSwitchingClassLoadingDelegate
extends Object
implements TypeDescription.SuperTypeLoading.ClassLoadingDelegate
A class loading delegate that delegates loading of the super type to another thread.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class
A class loading action that notifies the class loader's lock after the type was loaded.protected static class
A class loading action that simply loads a type.Nested classes/interfaces inherited from interface net.bytebuddy.description.type.TypeDescription.SuperTypeLoading.ClassLoadingDelegate
TypeDescription.SuperTypeLoading.ClassLoadingDelegate.Simple
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutorService
The executor service to delegate class loading to. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
ThreadSwitchingClassLoadingDelegate
(ExecutorService executorService) Creates a new thread-switching class loading delegate. -
Method Summary
Modifier and TypeMethodDescriptionClass
<?> load
(String name, ClassLoader classLoader) Loads a type.
-
Field Details
-
executorService
The executor service to delegate class loading to.
-
-
Constructor Details
-
ThreadSwitchingClassLoadingDelegate
Creates a new thread-switching class loading delegate.- Parameters:
executorService
- The executor service to delegate class loading to.
-
-
Method Details
-
load
Loads a type.- Specified by:
load
in interfaceTypeDescription.SuperTypeLoading.ClassLoadingDelegate
- Parameters:
name
- The type's name,classLoader
- The class loader to load the type from which might benull
to represent the bootstrap class loader.- Returns:
- The loaded type.
-