Package net.bytebuddy.agent.builder
Class AgentBuilder.Default.ExecutingTransformer.Factory.ForJava9CapableVm
- java.lang.Object
-
- net.bytebuddy.agent.builder.AgentBuilder.Default.ExecutingTransformer.Factory.ForJava9CapableVm
-
- All Implemented Interfaces:
AgentBuilder.Default.ExecutingTransformer.Factory
- Enclosing interface:
- AgentBuilder.Default.ExecutingTransformer.Factory
@Enhance public static class AgentBuilder.Default.ExecutingTransformer.Factory.ForJava9CapableVm extends java.lang.Object implements AgentBuilder.Default.ExecutingTransformer.Factory
A factory for a class file transformer on a JVM that supports thejava.lang.Module
API to override the newly added method of theClassFileTransformer
to capture an instrumented class's module.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.agent.builder.AgentBuilder.Default.ExecutingTransformer.Factory
AgentBuilder.Default.ExecutingTransformer.Factory.CreationAction, AgentBuilder.Default.ExecutingTransformer.Factory.ForJava9CapableVm, AgentBuilder.Default.ExecutingTransformer.Factory.ForLegacyVm
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.reflect.Constructor<? extends ResettableClassFileTransformer>
executingTransformer
A constructor for creating aClassFileTransformer
that overrides the newly added method for extracting thejava.lang.Module
of an instrumented class.
-
Constructor Summary
Constructors Modifier Constructor Description protected
ForJava9CapableVm(java.lang.reflect.Constructor<? extends ResettableClassFileTransformer> executingTransformer)
Creates a class file transformer factory for a Java 9 capable VM.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResettableClassFileTransformer
make(ByteBuddy byteBuddy, AgentBuilder.Listener listener, AgentBuilder.PoolStrategy poolStrategy, AgentBuilder.TypeStrategy typeStrategy, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy, AgentBuilder.InitializationStrategy initializationStrategy, AgentBuilder.InjectionStrategy injectionStrategy, AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy, AgentBuilder.DescriptionStrategy descriptionStrategy, AgentBuilder.FallbackStrategy fallbackStrategy, AgentBuilder.ClassFileBufferStrategy classFileBufferStrategy, AgentBuilder.InstallationListener installationListener, AgentBuilder.RawMatcher ignoreMatcher, java.util.List<AgentBuilder.Default.Transformation> transformations, AgentBuilder.CircularityLock circularityLock)
Creates a new class file transformer for the current VM.
-
-
-
Field Detail
-
executingTransformer
private final java.lang.reflect.Constructor<? extends ResettableClassFileTransformer> executingTransformer
A constructor for creating aClassFileTransformer
that overrides the newly added method for extracting thejava.lang.Module
of an instrumented class.
-
-
Constructor Detail
-
ForJava9CapableVm
protected ForJava9CapableVm(java.lang.reflect.Constructor<? extends ResettableClassFileTransformer> executingTransformer)
Creates a class file transformer factory for a Java 9 capable VM.- Parameters:
executingTransformer
- A constructor for creating aClassFileTransformer
that overrides the newly added method for extracting thejava.lang.Module
of an instrumented class.
-
-
Method Detail
-
make
public ResettableClassFileTransformer make(ByteBuddy byteBuddy, AgentBuilder.Listener listener, AgentBuilder.PoolStrategy poolStrategy, AgentBuilder.TypeStrategy typeStrategy, AgentBuilder.LocationStrategy locationStrategy, AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy, AgentBuilder.InitializationStrategy initializationStrategy, AgentBuilder.InjectionStrategy injectionStrategy, AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy, AgentBuilder.DescriptionStrategy descriptionStrategy, AgentBuilder.FallbackStrategy fallbackStrategy, AgentBuilder.ClassFileBufferStrategy classFileBufferStrategy, AgentBuilder.InstallationListener installationListener, AgentBuilder.RawMatcher ignoreMatcher, java.util.List<AgentBuilder.Default.Transformation> transformations, AgentBuilder.CircularityLock circularityLock)
Creates a new class file transformer for the current VM.- Specified by:
make
in interfaceAgentBuilder.Default.ExecutingTransformer.Factory
- Parameters:
byteBuddy
- The Byte Buddy instance to be used.listener
- The listener to notify on transformations.poolStrategy
- The type locator to use.typeStrategy
- The definition handler to use.locationStrategy
- The location strategy to use.nativeMethodStrategy
- The native method strategy to apply.initializationStrategy
- The initialization strategy to use for transformed types.injectionStrategy
- The injection strategy to use.lambdaInstrumentationStrategy
- The lambda instrumentation strategy to use.descriptionStrategy
- The description strategy for resolving type descriptions for types.fallbackStrategy
- The fallback strategy to use.classFileBufferStrategy
- The class file buffer strategy to use.installationListener
- The installation listener to notify.ignoreMatcher
- Identifies types that should not be instrumented.transformations
- The transformations to apply on non-ignored types.circularityLock
- The circularity lock to use.- Returns:
- A class file transformer for the current VM that supports the API of the current VM.
-
-