Package net.bytebuddy.agent.builder
Enum AgentBuilder.InjectionStrategy.UsingReflection
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.InjectionStrategy.UsingReflection>
-
- net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy.UsingReflection
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AgentBuilder.InjectionStrategy.UsingReflection>
,AgentBuilder.InjectionStrategy
- Enclosing interface:
- AgentBuilder.InjectionStrategy
public static enum AgentBuilder.InjectionStrategy.UsingReflection extends java.lang.Enum<AgentBuilder.InjectionStrategy.UsingReflection> implements AgentBuilder.InjectionStrategy
An injection strategy that uses Java reflection. This strategy is not capable of injecting classes into the bootstrap class loader.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy
AgentBuilder.InjectionStrategy.Disabled, AgentBuilder.InjectionStrategy.UsingInstrumentation, AgentBuilder.InjectionStrategy.UsingReflection, AgentBuilder.InjectionStrategy.UsingUnsafe
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
UsingReflection()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassInjector
resolve(java.lang.ClassLoader classLoader, java.security.ProtectionDomain protectionDomain)
Resolves the class injector to use for a given class loader and protection domain.static AgentBuilder.InjectionStrategy.UsingReflection
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AgentBuilder.InjectionStrategy.UsingReflection[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final AgentBuilder.InjectionStrategy.UsingReflection INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AgentBuilder.InjectionStrategy.UsingReflection[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AgentBuilder.InjectionStrategy.UsingReflection c : AgentBuilder.InjectionStrategy.UsingReflection.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AgentBuilder.InjectionStrategy.UsingReflection valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
resolve
public ClassInjector resolve(java.lang.ClassLoader classLoader, java.security.ProtectionDomain protectionDomain)
Resolves the class injector to use for a given class loader and protection domain.- Specified by:
resolve
in interfaceAgentBuilder.InjectionStrategy
- Parameters:
classLoader
- The class loader to use.protectionDomain
- The protection domain to use.- Returns:
- The class injector to use.
-
-