protected static interface ClassInjector.UsingReflection.Dispatcher
ClassLoader reflectively.| Modifier and Type | Interface and Description |
|---|---|
static class |
ClassInjector.UsingReflection.Dispatcher.CreationAction
A creation action for a dispatcher.
|
static class |
ClassInjector.UsingReflection.Dispatcher.Direct
A class injection dispatcher that is using reflection on the
ClassLoader methods. |
static interface |
ClassInjector.UsingReflection.Dispatcher.Initializable
Initializes a dispatcher to make non-accessible APIs accessible.
|
static class |
ClassInjector.UsingReflection.Dispatcher.Unavailable
Represents an unsuccessfully loaded method lookup.
|
static class |
ClassInjector.UsingReflection.Dispatcher.UsingUnsafeInjection
An indirect dispatcher that uses a redirection accessor class that was injected into the bootstrap class loader.
|
static class |
ClassInjector.UsingReflection.Dispatcher.UsingUnsafeOverride
A dispatcher implementation that uses
sun.misc.Unsafe#putBoolean to set the AccessibleObject field
for making methods accessible. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.Class<?> |
UNDEFINED
Indicates a class that is currently not defined.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<?> |
defineClass(java.lang.ClassLoader classLoader,
java.lang.String name,
byte[] binaryRepresentation,
java.security.ProtectionDomain protectionDomain)
Defines a class for the given class loader.
|
java.lang.Package |
definePackage(java.lang.ClassLoader classLoader,
java.lang.String name,
java.lang.String specificationTitle,
java.lang.String specificationVersion,
java.lang.String specificationVendor,
java.lang.String implementationTitle,
java.lang.String implementationVersion,
java.lang.String implementationVendor,
java.net.URL sealBase)
Defines a package for the given class loader.
|
java.lang.Class<?> |
findClass(java.lang.ClassLoader classLoader,
java.lang.String name)
Looks up a class from the given class loader.
|
java.lang.Object |
getClassLoadingLock(java.lang.ClassLoader classLoader,
java.lang.String name)
Returns the lock for loading the specified class.
|
java.lang.Package |
getPackage(java.lang.ClassLoader classLoader,
java.lang.String name)
Looks up a package from a class loader.
|
static final java.lang.Class<?> UNDEFINED
java.lang.Object getClassLoadingLock(java.lang.ClassLoader classLoader,
java.lang.String name)
classLoader - the class loader to inject the class into.name - The name of the class.java.lang.Class<?> findClass(java.lang.ClassLoader classLoader,
java.lang.String name)
classLoader - The class loader for which a class should be located.name - The binary name of the class that should be located.null if no such class is defined for the provided class loader.java.lang.Class<?> defineClass(java.lang.ClassLoader classLoader,
java.lang.String name,
byte[] binaryRepresentation,
java.security.ProtectionDomain protectionDomain)
classLoader - The class loader for which a new class should be defined.name - The binary name of the class that should be defined.binaryRepresentation - The binary representation of the class.protectionDomain - The protection domain for the defined class.java.lang.Package getPackage(java.lang.ClassLoader classLoader,
java.lang.String name)
classLoader - The class loader to query.name - The binary name of the package.null if no such package exists.java.lang.Package definePackage(java.lang.ClassLoader classLoader,
java.lang.String name,
java.lang.String specificationTitle,
java.lang.String specificationVersion,
java.lang.String specificationVendor,
java.lang.String implementationTitle,
java.lang.String implementationVersion,
java.lang.String implementationVendor,
java.net.URL sealBase)
classLoader - The class loader for which a package is to be defined.name - The binary name of the package.specificationTitle - The specification title of the package or null if no specification title exists.specificationVersion - The specification version of the package or null if no specification version exists.specificationVendor - The specification vendor of the package or null if no specification vendor exists.implementationTitle - The implementation title of the package or null if no implementation title exists.implementationVersion - The implementation version of the package or null if no implementation version exists.implementationVendor - The implementation vendor of the package or null if no implementation vendor exists.sealBase - The seal base URL or null if the package should not be sealed.