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 |
---|---|
static class |
AgentBuilder.Listener.Adapter
An adapter for a listener where all methods are implemented as non-operational.
|
static class |
AgentBuilder.Listener.Compound
A compound listener that allows to group several listeners in one instance.
|
static class |
AgentBuilder.Listener.Filtering
A listener that filters types with a given name from being logged.
|
static class |
AgentBuilder.Listener.ModuleReadEdgeCompleting
A listener that adds read-edges to any module of an instrumented class upon its transformation.
|
static class |
AgentBuilder.Listener.NoOp
A no-op implementation of a
AgentBuilder.Listener . |
static class |
AgentBuilder.Listener.StreamWriting
A listener that writes events to a
PrintStream . |
static class |
AgentBuilder.Listener.WithErrorsOnly
A listener that only delegates events if they are failed transformations.
|
static class |
AgentBuilder.Listener.WithTransformationsOnly
A listener that only delegates events if they are successful or failed transformations.
|
protected static class |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.ResubmissionListener
A listener that registers types for resubmission that failed during transformations.
|
Modifier and Type | Field and Description |
---|---|
protected AgentBuilder.Listener |
AgentBuilder.Default.listener
The listener to notify on transformations.
|
Modifier and Type | Method and Description |
---|---|
protected AgentBuilder.Listener |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation.getListener()
Returns the listener to apply.
|
protected static AgentBuilder.Listener |
AgentBuilder.Listener.ModuleReadEdgeCompleting.of(Instrumentation instrumentation,
boolean addTargetEdge,
Class<?>... type)
Resolves a listener that adds module edges from and to the instrumented type's module.
|
AgentBuilder.Listener |
AgentBuilder.Listener.StreamWriting.withErrorsOnly()
Returns a version of this listener that only reports failed transformations.
|
AgentBuilder.Listener |
AgentBuilder.Listener.StreamWriting.withTransformationsOnly()
Returns a version of this listener that only reports successfully transformed classes and failed transformations.
|
Modifier and Type | Method and Description |
---|---|
byte[] |
AgentBuilder.Default.Transformation.Resolution.apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener)
Transforms a type or returns
null if a type is not to be transformed. |
byte[] |
AgentBuilder.Default.Transformation.Resolution.Unresolved.apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener) |
byte[] |
AgentBuilder.Default.Transformation.Simple.Resolution.apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener) |
protected int |
AgentBuilder.RedefinitionStrategy.Collector.apply(Instrumentation instrumentation,
AgentBuilder.CircularityLock circularityLock,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener,
AgentBuilder.RedefinitionStrategy.BatchAllocator redefinitionBatchAllocator,
AgentBuilder.RedefinitionStrategy.Listener redefinitionListener,
int batch)
Applies all types that this collector collected.
|
void |
AgentBuilder.RedefinitionStrategy.apply(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 redefiniton.
|
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.apply(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(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) |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Installation |
AgentBuilder.RedefinitionStrategy.ResubmissionStrategy.Enabled.apply(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) |
protected void |
AgentBuilder.RedefinitionStrategy.Collector.consider(AgentBuilder.RawMatcher typeMatcher,
AgentBuilder.RawMatcher ignoredTypeMatcher,
AgentBuilder.Listener listener,
TypeDescription typeDescription,
Class<?> type,
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,
Class<?> type,
JavaModule module)
Does consider the retransformation or redefinition of a loaded type without a loaded type representation.
|
protected abstract void |
AgentBuilder.RedefinitionStrategy.Collector.doApply(Instrumentation instrumentation,
AgentBuilder.CircularityLock circularityLock,
List<Class<?>> types,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener)
Applies this collector.
|
protected void |
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.doApply(Instrumentation instrumentation,
AgentBuilder.CircularityLock circularityLock,
List<Class<?>> types,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener) |
protected void |
AgentBuilder.RedefinitionStrategy.Collector.ForRetransformation.doApply(Instrumentation instrumentation,
AgentBuilder.CircularityLock circularityLock,
List<Class<?>> types,
AgentBuilder.LocationStrategy locationStrategy,
AgentBuilder.Listener listener) |
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) |
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) |
AgentBuilder |
AgentBuilder.with(AgentBuilder.Listener listener)
Defines the given
AgentBuilder.Listener to be notified by the created agent. |
AgentBuilder |
AgentBuilder.Default.with(AgentBuilder.Listener listener) |
AgentBuilder |
AgentBuilder.Default.Delegator.with(AgentBuilder.Listener listener) |
Constructor and Description |
---|
Compound(List<? extends AgentBuilder.Listener> listeners)
Creates a new compound listener.
|
Copyright © 2014–2018. All rights reserved.