Package net.bytebuddy.dynamic.loading
Enum Class ClassInjector.UsingInstrumentation.Target
java.lang.Object
java.lang.Enum<ClassInjector.UsingInstrumentation.Target>
net.bytebuddy.dynamic.loading.ClassInjector.UsingInstrumentation.Target
- All Implemented Interfaces:
Serializable
,Comparable<ClassInjector.UsingInstrumentation.Target>
,Constable
- Enclosing class:
- ClassInjector.UsingInstrumentation
public static enum ClassInjector.UsingInstrumentation.Target
extends Enum<ClassInjector.UsingInstrumentation.Target>
A representation of the target to which Java classes should be appended to.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClassLoader
The class loader to load classes from. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Target
(ClassLoader classLoader) Creates a new injection target. -
Method Summary
Modifier and TypeMethodDescriptionprotected ClassLoader
Returns the class loader to load classes from.protected abstract void
inject
(Instrumentation instrumentation, JarFile jarFile) Adds the given classes to the represented class loader.Returns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BOOTSTRAP
Representation of the bootstrap class loader. -
SYSTEM
Representation of the system class loader.
-
-
Field Details
-
classLoader
The class loader to load classes from.
-
-
Constructor Details
-
Target
Creates a new injection target.- Parameters:
classLoader
- The class loader to load classes from.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getClassLoader
Returns the class loader to load classes from.- Returns:
- The class loader to load classes from.
-
inject
Adds the given classes to the represented class loader.- Parameters:
instrumentation
- The instrumentation instance to use.jarFile
- The jar file to append.
-