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:
Serializable
,Comparable<AgentBuilder.InjectionStrategy.UsingJna>
,java.lang.constant.Constable
,AgentBuilder.InjectionStrategy
- Enclosing interface:
AgentBuilder.InjectionStrategy
public static enum AgentBuilder.InjectionStrategy.UsingJna
extends 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 class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve
(ClassLoader classLoader, ProtectionDomain protectionDomain) Resolves the class injector to use for a given class loader and protection domain.Returns the enum constant of this type with the specified name.values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
UsingJna
private UsingJna()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
resolve
public ClassInjector resolve(@MaybeNull ClassLoader classLoader, @MaybeNull 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 ornull
if using the bootstrap loader.protectionDomain
- The protection domain to use ornull
if all privileges should be assigned.- Returns:
- The class injector to use.
-