@HashCodeAndEqualsPlugin.Enhance public static class AgentBuilder.Listener.WithErrorsOnly extends AgentBuilder.Listener.Adapter
AgentBuilder.Listener.Adapter, AgentBuilder.Listener.Compound, AgentBuilder.Listener.Filtering, AgentBuilder.Listener.ModuleReadEdgeCompleting, AgentBuilder.Listener.NoOp, AgentBuilder.Listener.StreamWriting, AgentBuilder.Listener.WithErrorsOnly, AgentBuilder.Listener.WithTransformationsOnly
Modifier and Type | Field and Description |
---|---|
private AgentBuilder.Listener |
delegate
The delegate listener.
|
LOADED
Constructor and Description |
---|
WithErrorsOnly(AgentBuilder.Listener delegate)
Creates a new listener that only delegates events if they are failed transformations.
|
Modifier and Type | Method and Description |
---|---|
void |
onError(java.lang.String typeName,
java.lang.ClassLoader classLoader,
JavaModule module,
boolean loaded,
java.lang.Throwable throwable)
Invoked when an error has occurred during transformation.
|
onComplete, onDiscovery, onIgnored, onTransformation
private final AgentBuilder.Listener delegate
public WithErrorsOnly(AgentBuilder.Listener delegate)
delegate
- The delegate listener.public void onError(java.lang.String typeName, java.lang.ClassLoader classLoader, JavaModule module, boolean loaded, java.lang.Throwable throwable)
AgentBuilder.Listener.Adapter
onError
in interface AgentBuilder.Listener
onError
in class AgentBuilder.Listener.Adapter
typeName
- The binary name of the instrumented type.classLoader
- The class loader which is loading this type.module
- The instrumented type's module or null
if the current VM does not support modules.loaded
- true
if the type is already loaded.throwable
- The occurred error.