Package net.bytebuddy.agent.builder
Enum AgentBuilder.Default.NativeMethodStrategy.Disabled
- java.lang.Object
-
- java.lang.Enum<AgentBuilder.Default.NativeMethodStrategy.Disabled>
-
- net.bytebuddy.agent.builder.AgentBuilder.Default.NativeMethodStrategy.Disabled
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AgentBuilder.Default.NativeMethodStrategy.Disabled>
,AgentBuilder.Default.NativeMethodStrategy
- Enclosing interface:
- AgentBuilder.Default.NativeMethodStrategy
public static enum AgentBuilder.Default.NativeMethodStrategy.Disabled extends java.lang.Enum<AgentBuilder.Default.NativeMethodStrategy.Disabled> implements AgentBuilder.Default.NativeMethodStrategy
A native method strategy that suffixes method names with a random suffix and disables native method rebasement.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Default.NativeMethodStrategy
AgentBuilder.Default.NativeMethodStrategy.Disabled, AgentBuilder.Default.NativeMethodStrategy.ForPrefix
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
The singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description private
Disabled()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getPrefix()
Returns the method prefix if the strategy is enabled.boolean
isEnabled(java.lang.instrument.Instrumentation instrumentation)
Determines if this strategy enables name prefixing for native methods.MethodNameTransformer
resolve()
Resolves the method name transformer for this strategy.static AgentBuilder.Default.NativeMethodStrategy.Disabled
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static AgentBuilder.Default.NativeMethodStrategy.Disabled[]
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.Default.NativeMethodStrategy.Disabled INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static AgentBuilder.Default.NativeMethodStrategy.Disabled[] 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.Default.NativeMethodStrategy.Disabled c : AgentBuilder.Default.NativeMethodStrategy.Disabled.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.Default.NativeMethodStrategy.Disabled 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 MethodNameTransformer resolve()
Resolves the method name transformer for this strategy.- Specified by:
resolve
in interfaceAgentBuilder.Default.NativeMethodStrategy
- Returns:
- A method name transformer for this strategy.
-
isEnabled
public boolean isEnabled(java.lang.instrument.Instrumentation instrumentation)
Determines if this strategy enables name prefixing for native methods.- Specified by:
isEnabled
in interfaceAgentBuilder.Default.NativeMethodStrategy
- Parameters:
instrumentation
- The instrumentation used.- Returns:
true
if this strategy indicates that a native method prefix should be used.
-
getPrefix
public java.lang.String getPrefix()
Returns the method prefix if the strategy is enabled. This method must only be called if this strategy enables prefixing.- Specified by:
getPrefix
in interfaceAgentBuilder.Default.NativeMethodStrategy
- Returns:
- The method prefix.
-
-