Package net.bytebuddy.agent.builder
Interface AgentBuilder.Default.NativeMethodStrategy
-
- All Known Implementing Classes:
AgentBuilder.Default.NativeMethodStrategy.Disabled,AgentBuilder.Default.NativeMethodStrategy.ForPrefix
- Enclosing class:
- AgentBuilder.Default
protected static interface AgentBuilder.Default.NativeMethodStrategyA strategy for determining if a native method name prefix should be used when rebasing methods.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.Default.NativeMethodStrategy.DisabledA native method strategy that suffixes method names with a random suffix and disables native method rebasement.static classAgentBuilder.Default.NativeMethodStrategy.ForPrefixA native method strategy that prefixes method names with a fixed value for supporting rebasing of native methods.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetPrefix()Returns the method prefix if the strategy is enabled.booleanisEnabled(java.lang.instrument.Instrumentation instrumentation)Determines if this strategy enables name prefixing for native methods.MethodNameTransformerresolve()Resolves the method name transformer for this strategy.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled(java.lang.instrument.Instrumentation instrumentation)
Determines if this strategy enables name prefixing for native methods.- Parameters:
instrumentation- The instrumentation used.- Returns:
trueif this strategy indicates that a native method prefix should be used.
-
resolve
MethodNameTransformer resolve()
Resolves the method name transformer for this strategy.- Returns:
- A method name transformer for this strategy.
-
getPrefix
java.lang.String getPrefix()
Returns the method prefix if the strategy is enabled. This method must only be called if this strategy enables prefixing.- Returns:
- The method prefix.
-
-