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 | Class and Description |
---|---|
protected static class |
AgentBuilder.Default.Transformation.DifferentialMatcher
A matcher that considers the differential of two transformers' transformations.
|
protected static class |
AgentBuilder.Default.Transformation.SimpleMatcher
A matcher that matches any type that is touched by a transformer without being ignored.
|
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.ignoreMatcher
Identifies types that should not be instrumented.
|
Modifier and Type | Method and Description |
---|---|
protected AgentBuilder.RawMatcher |
AgentBuilder.Default.Transformation.getMatcher()
Returns the matcher to identify types for transformation.
|
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.
|
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.apply(Instrumentation instrumentation,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
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(Instrumentation instrumentation,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
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(Instrumentation instrumentation,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
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.apply(Instrumentation instrumentation,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.RedefinitionStrategy.DiscoveryStrategy redefinitionDiscoveryStrategy,
AgentBuilder.LambdaInstrumentationStrategy lambdaInstrumentationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.RedefinitionStrategy.Listener redefinitionListener,
AgentBuilder.RawMatcher matcher,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.CircularityLock circularityLock)
Applies this redefinition strategy by submitting all loaded types to redefinition.
|
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.
|
protected abstract AgentBuilder.RedefinitionStrategy.Collector |
AgentBuilder.RedefinitionStrategy.make(AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.DescriptionStrategy descriptionStrategy,
AgentBuilder.FallbackStrategy fallbackStrategy,
AgentBuilder.Listener listener,
AgentBuilder.RawMatcher matcher,
AgentBuilder.CircularityLock circularityLock)
Creates a collector instance that is responsible for collecting loaded classes for potential retransformation.
|
ResettableClassFileTransformer |
AgentBuilder.Default.ExecutingTransformer.Factory.make(ByteBuddy byteBuddy,
AgentBuilder.Listener listener,
AgentBuilder.PoolStrategy poolStrategy,
AgentBuilder.TypeStrategy typeStrategy,
AgentBuilder.LocationStrategy locationStrategy,
ClassFileLocator classFileLocator,
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,
AgentBuilder.RedefinitionStrategy.ResubmissionEnforcer resubmissionEnforcer,
List<AgentBuilder.Default.Transformation> transformations,
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,
ClassFileLocator classFileLocator,
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,
AgentBuilder.RedefinitionStrategy.ResubmissionEnforcer resubmissionEnforcer,
List<AgentBuilder.Default.Transformation> transformations,
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,
ClassFileLocator classFileLocator,
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,
AgentBuilder.RedefinitionStrategy.ResubmissionEnforcer resubmissionEnforcer,
List<AgentBuilder.Default.Transformation> transformations,
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.
|
ResettableClassFileTransformer |
AgentBuilder.patchOn(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
AgentBuilder.RawMatcher differentialMatcher)
Creates and installs a
ResettableClassFileTransformer that implements the configuration of
this agent builder with a given Instrumentation . |
ResettableClassFileTransformer |
AgentBuilder.Default.patchOn(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
AgentBuilder.RawMatcher differentialMatcher)
Creates and installs a
ResettableClassFileTransformer that implements the configuration of
this agent builder with a given Instrumentation . |
ResettableClassFileTransformer |
AgentBuilder.Default.Delegator.patchOn(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
AgentBuilder.RawMatcher differentialMatcher)
Creates and installs a
ResettableClassFileTransformer that implements the configuration of
this agent builder with a given Instrumentation . |
ResettableClassFileTransformer |
AgentBuilder.patchOn(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
AgentBuilder.RawMatcher differentialMatcher,
AgentBuilder.PatchMode patchMode)
Creates and installs a
ResettableClassFileTransformer that implements the configuration of
this agent builder with a given Instrumentation . |
ResettableClassFileTransformer |
AgentBuilder.Default.patchOn(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
AgentBuilder.RawMatcher differentialMatcher,
AgentBuilder.PatchMode patchMode)
Creates and installs a
ResettableClassFileTransformer that implements the configuration of
this agent builder with a given Instrumentation . |
ResettableClassFileTransformer |
AgentBuilder.Default.Delegator.patchOn(Instrumentation instrumentation,
ResettableClassFileTransformer classFileTransformer,
AgentBuilder.RawMatcher differentialMatcher,
AgentBuilder.PatchMode patchMode)
Creates and installs a
ResettableClassFileTransformer that implements the configuration of
this agent builder with a given Instrumentation . |
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. |
Constructor and Description |
---|
Conjunction(List<? extends AgentBuilder.RawMatcher> matchers)
Creates a new conjunction of two raw matchers.
|
Disjunction(List<? extends AgentBuilder.RawMatcher> matchers)
Creates a new conjunction of two raw matchers.
|
Copyright © 2014–2025. All rights reserved.