Package net.bytebuddy.agent.builder
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.InjectionStrategyA strategy for injecting auxiliary types into a class loader.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classAgentBuilder.InjectionStrategy.DisabledAn injection strategy that does not permit class injection.static classAgentBuilder.InjectionStrategy.UsingInstrumentationAn injection strategy that uses bootstrap injection using anInstrumentationinstance.static classAgentBuilder.InjectionStrategy.UsingJnaAn injection strategy that uses JNA to inject classes.static classAgentBuilder.InjectionStrategy.UsingReflectionAn injection strategy that uses Java reflection.static classAgentBuilder.InjectionStrategy.UsingUnsafeAn injection strategy that usessun.misc.Unsafeorjdk.internal.misc.Unsafeto inject classes.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ClassInjectorresolve(java.lang.ClassLoader classLoader, java.security.ProtectionDomain protectionDomain)Resolves the class injector to use for a given class loader and protection domain.
-
-
-
Method Detail
-
resolve
ClassInjector resolve(@MaybeNull java.lang.ClassLoader classLoader, @MaybeNull java.security.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.
-
-