Package net.bytebuddy.agent.builder
Enum AgentBuilder.InjectionStrategy.UsingUnsafe
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.InjectionStrategy.UsingUnsafe>
-
- net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy.UsingUnsafe
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AgentBuilder.InjectionStrategy.UsingUnsafe>
,AgentBuilder.InjectionStrategy
- Enclosing interface:
- AgentBuilder.InjectionStrategy
public static enum AgentBuilder.InjectionStrategy.UsingUnsafe extends java.lang.Enum<AgentBuilder.InjectionStrategy.UsingUnsafe> implements AgentBuilder.InjectionStrategy
An injection strategy that usessun.misc.Unsafe
to inject classes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AgentBuilder.InjectionStrategy.UsingUnsafe.OfFactory
An injection strategy that uses a factory for creating an unsafe injector.-
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
UsingUnsafe()
-
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.UsingUnsafe
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AgentBuilder.InjectionStrategy.UsingUnsafe[]
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.UsingUnsafe INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AgentBuilder.InjectionStrategy.UsingUnsafe[] 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.UsingUnsafe c : AgentBuilder.InjectionStrategy.UsingUnsafe.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.UsingUnsafe 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.
-
-