Package net.bytebuddy.dynamic.loading
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 java.lang.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 net.bytebuddy.dynamic.loading.ByteArrayClassLoader.SynchronizationStrategy
ByteArrayClassLoader.SynchronizationStrategy.CreationAction, ByteArrayClassLoader.SynchronizationStrategy.ForJava7CapableVm, ByteArrayClassLoader.SynchronizationStrategy.ForJava8CapableVm, ByteArrayClassLoader.SynchronizationStrategy.ForLegacyVm, ByteArrayClassLoader.SynchronizationStrategy.Initializable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.MethodbindToThejava.lang.invoke.MethodHandle#bindTo(Object)method.private java.lang.reflect.MethodinvokeWithArgumentsThejava.lang.invoke.MethodHandle#invokeWithArguments(Object[])method.private java.lang.ObjectmethodHandleThejava.lang.invoke.MethodHandleto use.
-
Constructor Summary
Constructors Modifier Constructor Description protectedForJava8CapableVm(java.lang.Object methodHandle, java.lang.reflect.Method bindTo, java.lang.reflect.Method invokeWithArguments)Creates a new synchronization strategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ObjectgetClassLoadingLock(ByteArrayClassLoader classLoader, java.lang.String name)Receives the class loading lock.ByteArrayClassLoader.SynchronizationStrategyinitialize()Initializes this synchronization strategy.
-
-
-
Field Detail
-
methodHandle
private final java.lang.Object methodHandle
Thejava.lang.invoke.MethodHandleto use.
-
bindTo
private final java.lang.reflect.Method bindTo
Thejava.lang.invoke.MethodHandle#bindTo(Object)method.
-
invokeWithArguments
private final java.lang.reflect.Method invokeWithArguments
Thejava.lang.invoke.MethodHandle#invokeWithArguments(Object[])method.
-
-
Constructor Detail
-
ForJava8CapableVm
protected ForJava8CapableVm(java.lang.Object methodHandle, java.lang.reflect.Method bindTo, java.lang.reflect.Method invokeWithArguments)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 Detail
-
initialize
public ByteArrayClassLoader.SynchronizationStrategy initialize()
Initializes this synchronization strategy.- Specified by:
initializein interfaceByteArrayClassLoader.SynchronizationStrategy.Initializable- Returns:
- The synchronization strategy to use.
-
getClassLoadingLock
public java.lang.Object getClassLoadingLock(ByteArrayClassLoader classLoader, java.lang.String name)
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.
-
-