Package net.bytebuddy.dynamic.loading
Class ClassInjector.UsingReflection.Dispatcher.Direct.ForLegacyVm
- java.lang.Object
-
- net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
-
- net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct.ForLegacyVm
-
- All Implemented Interfaces:
ClassInjector.UsingReflection.Dispatcher
,ClassInjector.UsingReflection.Dispatcher.Initializable
- Enclosing class:
- ClassInjector.UsingReflection.Dispatcher.Direct
protected static class ClassInjector.UsingReflection.Dispatcher.Direct.ForLegacyVm extends ClassInjector.UsingReflection.Dispatcher.Direct
A resolved class dispatcher for a class injector prior to 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.ForLegacyVm
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher
ClassInjector.UsingReflection.Dispatcher.CreationAction, ClassInjector.UsingReflection.Dispatcher.Direct, ClassInjector.UsingReflection.Dispatcher.Indirect, ClassInjector.UsingReflection.Dispatcher.Initializable, ClassInjector.UsingReflection.Dispatcher.Unavailable
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
defineClass, definePackage, findLoadedClass, getPackage
-
Fields inherited from interface net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher
UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForLegacyVm(java.lang.reflect.Method findLoadedClass, java.lang.reflect.Method defineClass, java.lang.reflect.Method getPackage, java.lang.reflect.Method definePackage)
Creates a new resolved reflection store for a VM prior to Java 8.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getClassLoadingLock(java.lang.ClassLoader classLoader, java.lang.String name)
Returns the lock for loading the specified class.protected void
onInitialization()
Invoked upon initializing methods.-
Methods inherited from class net.bytebuddy.dynamic.loading.ClassInjector.UsingReflection.Dispatcher.Direct
defineClass, definePackage, findClass, getPackage, initialize, isAvailable, make
-
-
-
-
Constructor Detail
-
ForLegacyVm
protected ForLegacyVm(java.lang.reflect.Method findLoadedClass, java.lang.reflect.Method defineClass, java.lang.reflect.Method getPackage, java.lang.reflect.Method definePackage)
Creates a new resolved reflection store for a VM prior to Java 8.- Parameters:
findLoadedClass
- An instance ofClassLoader.findLoadedClass(String)
.defineClass
- An instance ofClassLoader.defineClass(String, byte[], int, int, ProtectionDomain)
.getPackage
- An instance ofClassLoader.getPackage(String)
orClassLoader#getDefinedPackage(String)
.definePackage
- An instance ofClassLoader.definePackage(String, String, String, String, String, String, String, URL)
.
-
-
Method Detail
-
getClassLoadingLock
public java.lang.Object getClassLoadingLock(java.lang.ClassLoader classLoader, java.lang.String name)
Description copied from interface:ClassInjector.UsingReflection.Dispatcher
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.
-
onInitialization
protected void onInitialization()
Description copied from class:ClassInjector.UsingReflection.Dispatcher.Direct
Invoked upon initializing methods.- Specified by:
onInitialization
in classClassInjector.UsingReflection.Dispatcher.Direct
-
-