public static class ClassInjector.UsingReflection extends Object implements ClassInjector
Modifier and Type | Class and Description |
---|---|
protected class |
ClassInjector.UsingReflection.ClassLoadingAction
A privileged action for loading a class reflectively.
|
protected static interface |
ClassInjector.UsingReflection.ReflectionStore
A storage for method representations in order to access a class loader reflectively.
|
ClassInjector.UsingInstrumentation, ClassInjector.UsingReflection
DEFAULT_PROTECTION_DOMAIN
Constructor and Description |
---|
UsingReflection(ClassLoader classLoader)
Creates a new injector for the given
ClassLoader and a default
ProtectionDomain . |
UsingReflection(ClassLoader classLoader,
ProtectionDomain protectionDomain)
Creates a new injector for the given
ClassLoader and ProtectionDomain . |
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
.classLoader
- The ClassLoader
into which new class definitions are to be injected.public UsingReflection(ClassLoader classLoader, ProtectionDomain protectionDomain)
ClassLoader
and ProtectionDomain
.classLoader
- The ClassLoader
into which new class definitions are to be injected.protectionDomain
- The protection domain to apply during class definition.public Map<TypeDescription,Class<?>> inject(Map<? extends TypeDescription,byte[]> types)
ClassInjector
inject
in interface ClassInjector
types
- The types to load via injection.Copyright © 2014–2015. All rights reserved.