Class ByteArrayClassLoader.SynchronizationStrategy.ForJava8CapableVm
java.lang.Object
net.bytebuddy.dynamic.loading.ByteArrayClassLoader.SynchronizationStrategy.ForJava8CapableVm
- All Implemented Interfaces:
ByteArrayClassLoader.SynchronizationStrategy, ByteArrayClassLoader.SynchronizationStrategy.Initializable
- Enclosing interface:
ByteArrayClassLoader.SynchronizationStrategy
@Enhance
public static class ByteArrayClassLoader.SynchronizationStrategy.ForJava8CapableVm
extends Object
implements ByteArrayClassLoader.SynchronizationStrategy, ByteArrayClassLoader.SynchronizationStrategy.Initializable
A synchronization engine for a VM that is aware of parallel-capable class loaders using method handles to respect module boundaries.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ByteArrayClassLoader.SynchronizationStrategy
ByteArrayClassLoader.SynchronizationStrategy.CreationAction, ByteArrayClassLoader.SynchronizationStrategy.ForJava7CapableVm, ByteArrayClassLoader.SynchronizationStrategy.ForJava8CapableVm, ByteArrayClassLoader.SynchronizationStrategy.ForLegacyVm, ByteArrayClassLoader.SynchronizationStrategy.Initializable -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedForJava8CapableVm(Object methodHandle, Method bindTo, Method invokeWithArguments) Creates a new synchronization strategy. -
Method Summary
Modifier and TypeMethodDescriptiongetClassLoadingLock(ByteArrayClassLoader classLoader, String name) Receives the class loading lock.Initializes this synchronization strategy.
-
Field Details
-
methodHandle
Thejava.lang.invoke.MethodHandleto use. -
bindTo
Thejava.lang.invoke.MethodHandle#bindTo(Object)method. -
invokeWithArguments
Thejava.lang.invoke.MethodHandle#invokeWithArguments(Object[])method.
-
-
Constructor Details
-
ForJava8CapableVm
Creates a new synchronization strategy.- Parameters:
methodHandle- Thejava.lang.invoke.MethodHandleto use.bindTo- Thejava.lang.invoke.MethodHandle#bindTo(Object)method.invokeWithArguments- Thejava.lang.invoke.MethodHandle#invokeWithArguments(Object[])method.
-
-
Method Details
-
initialize
Initializes this synchronization strategy.- Specified by:
initializein interfaceByteArrayClassLoader.SynchronizationStrategy.Initializable- Returns:
- The synchronization strategy to use.
-
getClassLoadingLock
Receives the class loading lock.- Specified by:
getClassLoadingLockin interfaceByteArrayClassLoader.SynchronizationStrategy- Parameters:
classLoader- The class loader loading the class.name- The name of the class being loaded.- Returns:
- The corresponding class loading lock.
-