Interface AgentBuilder.InjectionStrategy
- All Known Implementing Classes:
AgentBuilder.InjectionStrategy.Disabled, AgentBuilder.InjectionStrategy.UsingInstrumentation, AgentBuilder.InjectionStrategy.UsingJna, AgentBuilder.InjectionStrategy.UsingReflection, AgentBuilder.InjectionStrategy.UsingUnsafe, AgentBuilder.InjectionStrategy.UsingUnsafe.OfFactory
- Enclosing interface:
AgentBuilder
public static interface AgentBuilder.InjectionStrategy
A strategy for injecting auxiliary types into a class loader.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumAn injection strategy that does not permit class injection.static classAn injection strategy that uses bootstrap injection using anInstrumentationinstance.static enumAn injection strategy that uses JNA to inject classes.static enumAn injection strategy that uses Java reflection.static enumAn injection strategy that usessun.misc.Unsafeorjdk.internal.misc.Unsafeto inject classes. -
Method Summary
Modifier and TypeMethodDescriptionresolve(ClassLoader classLoader, ProtectionDomain protectionDomain) Resolves the class injector to use for a given class loader and protection domain.
-
Method Details
-
resolve
ClassInjector resolve(@MaybeNull ClassLoader classLoader, @MaybeNull ProtectionDomain protectionDomain) Resolves the class injector to use for a given class loader and protection domain.- Parameters:
classLoader- The class loader to use ornullif using the bootstrap loader.protectionDomain- The protection domain to use ornullif all privileges should be assigned.- Returns:
- The class injector to use.
-