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 voidapply(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer)Applies this native method strategy.MethodNameTransformerresolve()Resolves the method name transformer for this strategy.
-
-
-
Method Detail
-
resolve
MethodNameTransformer resolve()
Resolves the method name transformer for this strategy.- Returns:
- A method name transformer for this strategy.
-
apply
void apply(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer)Applies this native method strategy.- Parameters:
instrumentation- The instrumentation to apply this strategy upon.classFileTransformer- The class file transformer being registered.
-
-