public static class ClassInjector.UsingReflection extends Object implements ClassInjector
| Modifier and Type | Class and Description | 
|---|---|
| protected static interface  | ClassInjector.UsingReflection.DispatcherA dispatcher for accessing a  ClassLoaderreflectively. | 
ClassInjector.UsingInstrumentation, ClassInjector.UsingReflectionDEFAULT_FORBID_EXISTING, DEFAULT_PROTECTION_DOMAIN| Constructor and Description | 
|---|
| UsingReflection(ClassLoader classLoader)Creates a new injector for the given  ClassLoaderand a defaultProtectionDomain,PackageDefinitionStrategy,AccessControlContextwhich does not trigger an error when discovering existent classes. | 
| UsingReflection(ClassLoader classLoader,
               ProtectionDomain protectionDomain,
               AccessControlContext accessControlContext)Creates a new injector for the given  ClassLoaderand a defaultPackageDefinitionStrategywhere the
 injection of existent classes does not trigger an error. | 
| UsingReflection(ClassLoader classLoader,
               ProtectionDomain protectionDomain,
               AccessControlContext accessControlContext,
               PackageDefinitionStrategy packageDefinitionStrategy,
               boolean forbidExisting)Creates a new injector for the given  ClassLoaderandProtectionDomain. | 
| Modifier and Type | Method and Description | 
|---|---|
| boolean | equals(Object other) | 
| int | hashCode() | 
| Map<TypeDescription,Class<?>> | inject(Map<? extends TypeDescription,byte[]> types)Injects the given types into the represented class loader. | 
| String | toString() | 
public UsingReflection(ClassLoader classLoader)
ClassLoader and a default ProtectionDomain,
 PackageDefinitionStrategy, AccessControlContext which does not trigger an error when discovering existent classes.classLoader - The ClassLoader into which new class definitions are to be injected.public UsingReflection(ClassLoader classLoader, ProtectionDomain protectionDomain, AccessControlContext accessControlContext)
ClassLoader and a default PackageDefinitionStrategy where the
 injection of existent classes does not trigger an error.classLoader - The ClassLoader into which new class definitions are to be injected.protectionDomain - The protection domain to apply during class definition.accessControlContext - The access control context of this class loader's instantiation.public UsingReflection(ClassLoader classLoader, ProtectionDomain protectionDomain, AccessControlContext accessControlContext, PackageDefinitionStrategy packageDefinitionStrategy, boolean forbidExisting)
ClassLoader and ProtectionDomain.classLoader - The ClassLoader into which new class definitions are to be injected.protectionDomain - The protection domain to apply during class definition.accessControlContext - The access control context of this class loader's instantiation.packageDefinitionStrategy - The package definer to be queried for package definitions.forbidExisting - Determines if an exception should be thrown when attempting to load a type that already exists.public Map<TypeDescription,Class<?>> inject(Map<? extends TypeDescription,byte[]> types)
ClassInjectorinject in interface ClassInjectortypes - The types to load via injection.Copyright © 2014–2015. All rights reserved.