Package net.bytebuddy.agent.builder
Enum AgentBuilder.InjectionStrategy.UsingJna
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.InjectionStrategy.UsingJna>
-
- net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy.UsingJna
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AgentBuilder.InjectionStrategy.UsingJna>
,AgentBuilder.InjectionStrategy
- Enclosing interface:
- AgentBuilder.InjectionStrategy
public static enum AgentBuilder.InjectionStrategy.UsingJna extends java.lang.Enum<AgentBuilder.InjectionStrategy.UsingJna> implements AgentBuilder.InjectionStrategy
An injection strategy that uses JNA to inject classes. This strategy is only available if JNA was added as a dependency.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.InjectionStrategy
AgentBuilder.InjectionStrategy.Disabled, AgentBuilder.InjectionStrategy.UsingInstrumentation, AgentBuilder.InjectionStrategy.UsingJna, 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
UsingJna()
-
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.UsingJna
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AgentBuilder.InjectionStrategy.UsingJna[]
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.UsingJna INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AgentBuilder.InjectionStrategy.UsingJna[] 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.UsingJna c : AgentBuilder.InjectionStrategy.UsingJna.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.UsingJna 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.
-
-