Package net.bytebuddy.dynamic.loading
Class ClassInjector.UsingReflection.Dispatcher.Direct.ForJava7CapableVm
java.lang.Object
net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct.ForJava7CapableVm
- All Implemented Interfaces:
ClassInjector.UsingReflection.Dispatcher,ClassInjector.UsingReflection.Dispatcher.Initializable
- Enclosing class:
ClassInjector.UsingReflection.Dispatcher.Direct
@Enhance
protected static class ClassInjector.UsingReflection.Dispatcher.Direct.ForJava7CapableVm
extends ClassInjector.UsingReflection.Dispatcher.Direct
A resolved class dispatcher for a class injector on a VM running at least Java 7.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
ClassInjector.UsingReflection.Dispatcher.Direct.ForJava7CapableVm, ClassInjector.UsingReflection.Dispatcher.Direct.ForLegacyVmNested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher
ClassInjector.UsingReflection.Dispatcher.CreationAction, ClassInjector.UsingReflection.Dispatcher.Direct, ClassInjector.UsingReflection.Dispatcher.Initializable, ClassInjector.UsingReflection.Dispatcher.Unavailable, ClassInjector.UsingReflection.Dispatcher.UsingUnsafeInjection, ClassInjector.UsingReflection.Dispatcher.UsingUnsafeOverrideNested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Initializable
ClassInjector.UsingReflection.Dispatcher.Initializable.Unavailable -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodAn instance ofClassLoader#getClassLoadingLock(String).Fields inherited from class net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
defineClass, definePackage, findLoadedClass, getDefinedPackage, getPackageFields inherited from interface net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher
UNDEFINED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClassLoadingLock(ClassLoader classLoader, String name) Returns the lock for loading the specified class.Methods inherited from class net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
defineClass, definePackage, findClass, getDefinedPackage, getPackage, initialize, isAvailable, make
-
Field Details
-
getClassLoadingLock
An instance ofClassLoader#getClassLoadingLock(String).
-
-
Constructor Details
-
ForJava7CapableVm
protected ForJava7CapableVm(Method findLoadedClass, Method defineClass, @MaybeNull Method getDefinedPackage, Method getPackage, Method definePackage, Method getClassLoadingLock) Creates a new resolved reflection store for a VM running at least Java 7.- Parameters:
findLoadedClass- An instance ofClassLoader.findLoadedClass(String).defineClass- An instance ofClassLoader.defineClass(String, byte[], int, int, ProtectionDomain).getDefinedPackage- An instance ofjava.lang,ClassLoader#getDefinedPackage(String). May benull.getPackage- An instance ofClassLoader.getPackage(String).definePackage- An instance ofClassLoader.definePackage(String, String, String, String, String, String, String, URL).getClassLoadingLock- An instance ofClassLoader#getClassLoadingLock(String).
-
-
Method Details
-
getClassLoadingLock
Returns the lock for loading the specified class.- Parameters:
classLoader- the class loader to inject the class into.name- The name of the class.- Returns:
- The lock for loading this class.
-