public static class ClassInjector.UsingInstrumentation extends Object implements ClassInjector
Instrumentation
to append to either the boot classpath
or the system class path.Modifier and Type | Class and Description |
---|---|
static class |
ClassInjector.UsingInstrumentation.Target
A representation of the target to which Java classes should be appended to.
|
ClassInjector.UsingInstrumentation, ClassInjector.UsingLookup, ClassInjector.UsingReflection, ClassInjector.UsingUnsafe
ALLOW_EXISTING_TYPES
Modifier | Constructor and Description |
---|---|
protected |
UsingInstrumentation(File folder,
ClassInjector.UsingInstrumentation.Target target,
Instrumentation instrumentation,
RandomString randomString)
Creates an instrumentation-based class injector.
|
Modifier and Type | Method and Description |
---|---|
Map<TypeDescription,Class<?>> |
inject(Map<? extends TypeDescription,byte[]> types)
Injects the given types into the represented class loader.
|
static ClassInjector |
of(File folder,
ClassInjector.UsingInstrumentation.Target target,
Instrumentation instrumentation)
Creates an instrumentation-based class injector.
|
protected UsingInstrumentation(File folder, ClassInjector.UsingInstrumentation.Target target, Instrumentation instrumentation, RandomString randomString)
folder
- The folder to be used for storing jar files.target
- A representation of the target path to which classes are to be appended.instrumentation
- The instrumentation to use for appending to the class path or the boot path.randomString
- The random string generator to use.public static ClassInjector of(File folder, ClassInjector.UsingInstrumentation.Target target, Instrumentation instrumentation)
folder
- The folder to be used for storing jar files.target
- A representation of the target path to which classes are to be appended.instrumentation
- The instrumentation to use for appending to the class path or the boot path.public Map<TypeDescription,Class<?>> inject(Map<? extends TypeDescription,byte[]> types)
ClassInjector
inject
in interface ClassInjector
types
- The types to load via injection.Copyright © 2014–2017. All rights reserved.