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.NativeMethodStrategy
A 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 class
AgentBuilder.Default.NativeMethodStrategy.Disabled
A native method strategy that suffixes method names with a random suffix and disables native method rebasement.static class
AgentBuilder.Default.NativeMethodStrategy.ForPrefix
A 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 void
apply(java.lang.instrument.Instrumentation instrumentation, java.lang.instrument.ClassFileTransformer classFileTransformer)
Applies this native method strategy.MethodNameTransformer
resolve()
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.
-
-