public static class ClassInjector.UsingReflection.Dispatcher.Resolved extends Object implements ClassInjector.UsingReflection.Dispatcher, ClassInjector.UsingReflection.Dispatcher.Initializable, PrivilegedAction<ClassInjector.UsingReflection.Dispatcher>
ClassInjector.UsingReflection.Dispatcher.Faulty, ClassInjector.UsingReflection.Dispatcher.Initializable, ClassInjector.UsingReflection.Dispatcher.Resolved
Modifier | Constructor and Description |
---|---|
protected |
Resolved(Method findLoadedClass,
Method loadClass,
Method getPackage,
Method definePackage)
Creates a new resolved reflection store.
|
Modifier and Type | Method and Description |
---|---|
Package |
definePackage(ClassLoader classLoader,
String packageName,
String specificationTitle,
String specificationVersion,
String specificationVendor,
String implementationTitle,
String implementationVersion,
String implementationVendor,
URL sealBase)
Defines a package for the given class loader.
|
boolean |
equals(Object other) |
Class<?> |
findClass(ClassLoader classLoader,
String name)
Looks up a class from the given class loader.
|
Package |
getPackage(ClassLoader classLoader,
String name)
Looks up a package from a class loader.
|
int |
hashCode() |
ClassInjector.UsingReflection.Dispatcher |
initialize(AccessControlContext accessControlContext)
Initializes this dispatcher.
|
Class<?> |
loadClass(ClassLoader classLoader,
String name,
byte[] binaryRepresentation,
int startIndex,
int endIndex,
ProtectionDomain protectionDomain)
Defines a class for the given class loader.
|
ClassInjector.UsingReflection.Dispatcher |
run() |
String |
toString() |
protected Resolved(Method findLoadedClass, Method loadClass, Method getPackage, Method definePackage)
findLoadedClass
- An accessible instance of ClassLoader.findLoadedClass(String)
.loadClass
- An accessible instance of ClassLoader.loadClass(String)
.getPackage
- An accessible instance of ClassLoader.getPackage(String)
.definePackage
- An accessible instance of
ClassLoader.definePackage(String, String, String, String, String, String, String, URL)
.public Class<?> findClass(ClassLoader classLoader, String name)
ClassInjector.UsingReflection.Dispatcher
findClass
in interface ClassInjector.UsingReflection.Dispatcher
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.public Class<?> loadClass(ClassLoader classLoader, String name, byte[] binaryRepresentation, int startIndex, int endIndex, ProtectionDomain protectionDomain)
ClassInjector.UsingReflection.Dispatcher
loadClass
in interface ClassInjector.UsingReflection.Dispatcher
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.startIndex
- The start index of the provided binary representation.endIndex
- The final index of the binary representation.protectionDomain
- The protection domain for the defined class.public Package getPackage(ClassLoader classLoader, String name)
ClassInjector.UsingReflection.Dispatcher
getPackage
in interface ClassInjector.UsingReflection.Dispatcher
classLoader
- The class loader to query.name
- The binary name of the package.null
if no such package exists.public Package definePackage(ClassLoader classLoader, String packageName, String specificationTitle, String specificationVersion, String specificationVendor, String implementationTitle, String implementationVersion, String implementationVendor, URL sealBase)
ClassInjector.UsingReflection.Dispatcher
definePackage
in interface ClassInjector.UsingReflection.Dispatcher
classLoader
- The class loader for which a package is to be defined.packageName
- 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.public ClassInjector.UsingReflection.Dispatcher initialize(AccessControlContext accessControlContext)
ClassInjector.UsingReflection.Dispatcher.Initializable
initialize
in interface ClassInjector.UsingReflection.Dispatcher.Initializable
accessControlContext
- The access control context to use for initialization.public ClassInjector.UsingReflection.Dispatcher run()
run
in interface PrivilegedAction<ClassInjector.UsingReflection.Dispatcher>
Copyright © 2014–2016. All rights reserved.