Package | Description |
---|---|
net.bytebuddy.agent.builder |
An agent builder is used to easily implement load-time class-transformations using a Java agent.
|
Modifier and Type | Interface and Description |
---|---|
protected static interface |
AgentBuilder.Default.Transformation
A transformation serves as a handler for modifying a class.
|
Modifier and Type | Class and Description |
---|---|
static class |
AgentBuilder.Default.Transformation.Compound
A compound transformation that applied several transformation in the given order and applies the first active transformation.
|
static class |
AgentBuilder.Default.Transformation.Ignored
A transformation that does not attempt to transform any type.
|
static class |
AgentBuilder.Default.Transformation.Simple
A simple, active transformation.
|
static class |
AgentBuilder.RawMatcher.Conjunction
A conjunction of two raw matchers.
|
static class |
AgentBuilder.RawMatcher.Disjunction
A disjunction of two raw matchers.
|
static class |
AgentBuilder.RawMatcher.ForElementMatchers
A raw matcher implementation that checks a
TypeDescription
and its ClassLoader against two suitable matchers in order to determine if the matched
type should be instrumented. |
static class |
AgentBuilder.RawMatcher.ForLoadState
A raw matcher indicating the state of a type's class loading.
|
static class |
AgentBuilder.RawMatcher.ForResolvableTypes
Only matches loaded types that can be fully resolved.
|
static class |
AgentBuilder.RawMatcher.Inversion
A raw matcher that inverts a raw matcher's result.
|
static class |
AgentBuilder.RawMatcher.Trivial
A matcher that always or never matches a type.
|
Modifier and Type | Field and Description |
---|---|
protected AgentBuilder.RawMatcher |
AgentBuilder.Default.ignoredTypeMatcher
Identifies types that should not be instrumented.
|
private AgentBuilder.RawMatcher |
AgentBuilder.Default.ExecutingTransformer.ignoredTypeMatcher
Identifies types that should not be instrumented.
|
private AgentBuilder.RawMatcher |
AgentBuilder.RawMatcher.Conjunction.left
The left matcher which is applied first.
|
private AgentBuilder.RawMatcher |
AgentBuilder.RawMatcher.Disjunction.left
The left matcher which is applied first.
|
private AgentBuilder.RawMatcher |
AgentBuilder.RawMatcher.Inversion.matcher
The matcher to invert.
|
private AgentBuilder.RawMatcher |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionInstallationListener.matcher
The matcher to apply for analyzing if a type is to be resubmitted.
|
private AgentBuilder.RawMatcher |
AgentBuilder.Default.Transformation.Simple.rawMatcher
The raw matcher that is represented by this transformation.
|
private AgentBuilder.RawMatcher |
AgentBuilder.Default.Ignoring.rawMatcher
A matcher for identifying types that should not be instrumented.
|
private AgentBuilder.RawMatcher |
AgentBuilder.Default.Transforming.rawMatcher
The supplied raw matcher.
|
private AgentBuilder.RawMatcher |
AgentBuilder.RawMatcher.Conjunction.right
The right matcher which is applied second.
|
private AgentBuilder.RawMatcher |
AgentBuilder.RawMatcher.Disjunction.right
The right matcher which is applied second.
|
Modifier and Type | Method and Description |
---|---|
AgentBuilder.RawMatcher |
AgentBuilder.RawMatcher.ForResolvableTypes.inverted()
Returns an inverted version of this matcher.
|
Modifier and Type | Method and Description |
---|---|
T |
AgentBuilder.Matchable.and(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.
|
AgentBuilder.Ignored |
AgentBuilder.Default.Ignoring.and(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.
|
AgentBuilder.Identified.Narrowable |
AgentBuilder.Default.Transforming.and(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if both the previous matcher and the supplied matcher are matched.
|
void |
AgentBuilder.RedefinitionStrategy.apply(java.lang.instrument.Instrumentation instrumentation,
AgentBuilder.Listener listener,
AgentBuilder.CircularityLock circularityLock,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.RedefinitionStrategy.DiscoveryStrategy redefinitionDiscoveryStrategy,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionListener,
AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.RawMatcher typeMatcher,
AgentBuilder.RawMatcher ignoredTypeMatcher)
Applies this redefinition strategy by submitting all loaded types to redefinition.
|
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.apply(java.lang.instrument.Instrumentation instrumentation,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.InstallationListener installationListener,
AgentBuilder.CircularityLock circularityLock,
AgentBuilder.RawMatcher matcher,
AgentBuilder.RedefinitionStrategy redefinitionStrategy,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener)
Invoked upon installation of an agent builder.
|
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Disabled.apply(java.lang.instrument.Instrumentation instrumentation,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.InstallationListener installationListener,
AgentBuilder.CircularityLock circularityLock,
AgentBuilder.RawMatcher matcher,
AgentBuilder.RedefinitionStrategy redefinitionStrategy,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener)
Invoked upon installation of an agent builder.
|
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.apply(java.lang.instrument.Instrumentation instrumentation,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.InstallationListener installationListener,
AgentBuilder.CircularityLock circularityLock,
AgentBuilder.RawMatcher matcher,
AgentBuilder.RedefinitionStrategy redefinitionStrategy,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionBatchListener)
Invoked upon installation of an agent builder.
|
protected void |
AgentBuilder.RedefinitionStrategy.Collector.consider(AgentBuilder.RawMatcher typeMatcher,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
java.lang.Class<?> type,
java.lang.Class<?> classBeingRedefined,
JavaModule module,
boolean unmodifiable)
Does consider the retransformation or redefinition of a loaded type.
|
protected void |
AgentBuilder.RedefinitionStrategy.Collector.consider(AgentBuilder.RawMatcher typeMatcher,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
java.lang.Class<?> type,
JavaModule module)
Does consider the retransformation or redefinition of a loaded type without a loaded type representation.
|
AgentBuilder.Ignored |
AgentBuilder.ignore(AgentBuilder.RawMatcher rawMatcher)
Excludes any type that is matched by the raw matcher provided to this method.
|
AgentBuilder.Ignored |
AgentBuilder.Default.ignore(AgentBuilder.RawMatcher rawMatcher)
Excludes any type that is matched by the raw matcher provided to this method.
|
AgentBuilder.Ignored |
AgentBuilder.Default.Delegator.ignore(AgentBuilder.RawMatcher rawMatcher)
Excludes any type that is matched by the raw matcher provided to this method.
|
ResettableClassFileTransformer |
AgentBuilder.Default.ExecutingTransformer.Factory.make(ByteBuddy byteBuddy,
AgentBuilder.Listener listener,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.TypeStrategy typeStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy,
AgentBuilder.InitializationStrategy initializationStrategy,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.ClassFileBufferStrategy classFileBufferStrategy,
AgentBuilder.InstallationListener installationListener,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Default.Transformation transformation,
AgentBuilder.CircularityLock circularityLock)
Creates a new class file transformer for the current VM.
|
ResettableClassFileTransformer |
AgentBuilder.Default.ExecutingTransformer.Factory.ForJava9CapableVm.make(ByteBuddy byteBuddy,
AgentBuilder.Listener listener,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.TypeStrategy typeStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy,
AgentBuilder.InitializationStrategy initializationStrategy,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.ClassFileBufferStrategy classFileBufferStrategy,
AgentBuilder.InstallationListener installationListener,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Default.Transformation transformation,
AgentBuilder.CircularityLock circularityLock)
Creates a new class file transformer for the current VM.
|
ResettableClassFileTransformer |
AgentBuilder.Default.ExecutingTransformer.Factory.ForLegacyVm.make(ByteBuddy byteBuddy,
AgentBuilder.Listener listener,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.TypeStrategy typeStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy,
AgentBuilder.InitializationStrategy initializationStrategy,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.ClassFileBufferStrategy classFileBufferStrategy,
AgentBuilder.InstallationListener installationListener,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Default.Transformation transformation,
AgentBuilder.CircularityLock circularityLock)
Creates a new class file transformer for the current VM.
|
T |
AgentBuilder.Matchable.or(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if the previous matcher or the supplied matcher are matched.
|
AgentBuilder.Ignored |
AgentBuilder.Default.Ignoring.or(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if the previous matcher or the supplied matcher are matched.
|
AgentBuilder.Identified.Narrowable |
AgentBuilder.Default.Transforming.or(AgentBuilder.RawMatcher rawMatcher)
Defines a matching that is positive if the previous matcher or the supplied matcher are matched.
|
AgentBuilder.Identified.Narrowable |
AgentBuilder.type(AgentBuilder.RawMatcher matcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformer s before loading this type. |
AgentBuilder.Identified.Narrowable |
AgentBuilder.Default.type(AgentBuilder.RawMatcher matcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformer s before loading this type. |
AgentBuilder.Identified.Narrowable |
AgentBuilder.Default.Delegator.type(AgentBuilder.RawMatcher matcher)
Matches a type being loaded in order to apply the supplied
AgentBuilder.Transformer s before loading this type. |