public static class ClassInjector.UsingReflection.Dispatcher.Indirect extends Object implements ClassInjector.UsingReflection.Dispatcher, ClassInjector.UsingReflection.Dispatcher.Initializable
ClassInjector.UsingReflection.Dispatcher.CreationAction, ClassInjector.UsingReflection.Dispatcher.Direct, ClassInjector.UsingReflection.Dispatcher.Indirect, ClassInjector.UsingReflection.Dispatcher.Initializable, ClassInjector.UsingReflection.Dispatcher.UnavailableUNDEFINED| Modifier | Constructor and Description | 
|---|---|
protected  | 
Indirect(Object accessor,
        Method findLoadedClass,
        Method defineClass,
        Method getPackage,
        Method definePackage,
        Method getClassLoadingLock)
Creates a new indirect class loading injection dispatcher. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
Class<?> | 
defineClass(ClassLoader classLoader,
           String name,
           byte[] binaryRepresentation,
           ProtectionDomain protectionDomain)
Defines a class for the given class loader. 
 | 
Package | 
definePackage(ClassLoader classLoader,
             String name,
             String specificationTitle,
             String specificationVersion,
             String specificationVendor,
             String implementationTitle,
             String implementationVersion,
             String implementationVendor,
             URL sealBase)
Defines a package for the given class loader. 
 | 
Class<?> | 
findClass(ClassLoader classLoader,
         String name)
Looks up a class from the given class loader. 
 | 
Object | 
getClassLoadingLock(ClassLoader classLoader,
                   String name)
Returns the lock for loading the specified class. 
 | 
Package | 
getPackage(ClassLoader classLoader,
          String name)
Looks up a package from a class loader. 
 | 
ClassInjector.UsingReflection.Dispatcher | 
initialize()
Initializes this dispatcher. 
 | 
boolean | 
isAvailable()
Indicates if this dispatcher is available. 
 | 
static ClassInjector.UsingReflection.Dispatcher.Initializable | 
make()
Creates an indirect dispatcher. 
 | 
protected Indirect(Object accessor, Method findLoadedClass, Method defineClass, Method getPackage, Method definePackage, Method getClassLoadingLock)
accessor - An instance of the accessor class that is required for using it's intentionally non-static methods.findLoadedClass - An instance of ClassLoader.findLoadedClass(String).defineClass - An instance of ClassLoader.defineClass(String, byte[], int, int, ProtectionDomain).getPackage - An instance of ClassLoader.getPackage(String) or ClassLoader#getDefinedPackage(String).definePackage - An instance of ClassLoader.definePackage(String, String, String, String, String, String, String, URL).getClassLoadingLock - The accessor method for using ClassLoader#getClassLoadingLock(String) or returning the
                            supplied ClassLoader if this method does not exist on the current VM.public boolean isAvailable()
ClassInjector.UsingReflection.Dispatcher.InitializableisAvailable in interface ClassInjector.UsingReflection.Dispatcher.Initializabletrue if this dispatcher is available.public static ClassInjector.UsingReflection.Dispatcher.Initializable make() throws Exception
Exception - If the dispatcher cannot be created.public ClassInjector.UsingReflection.Dispatcher initialize()
ClassInjector.UsingReflection.Dispatcher.Initializableinitialize in interface ClassInjector.UsingReflection.Dispatcher.Initializablepublic Object getClassLoadingLock(ClassLoader classLoader, String name)
ClassInjector.UsingReflection.DispatchergetClassLoadingLock in interface ClassInjector.UsingReflection.DispatcherclassLoader - the class loader to inject the class into.name - The name of the class.public Class<?> findClass(ClassLoader classLoader, String name)
ClassInjector.UsingReflection.DispatcherfindClass in interface ClassInjector.UsingReflection.DispatcherclassLoader - 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<?> defineClass(ClassLoader classLoader, String name, byte[] binaryRepresentation, ProtectionDomain protectionDomain)
ClassInjector.UsingReflection.DispatcherdefineClass in interface ClassInjector.UsingReflection.DispatcherclassLoader - 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.public Package getPackage(ClassLoader classLoader, String name)
ClassInjector.UsingReflection.DispatchergetPackage in interface ClassInjector.UsingReflection.DispatcherclassLoader - The class loader to query.name - The binary name of the package.null if no such package exists.public Package definePackage(ClassLoader classLoader, String name, String specificationTitle, String specificationVersion, String specificationVendor, String implementationTitle, String implementationVersion, String implementationVendor, URL sealBase)
ClassInjector.UsingReflection.DispatcherdefinePackage in interface ClassInjector.UsingReflection.DispatcherclassLoader - 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.Copyright © 2014–2018. All rights reserved.