public final class InstrumentationRegistryListener
extends net.bytebuddy.agent.builder.AgentBuilder.Listener.Adapter
net.bytebuddy.agent.builder.AgentBuilder.Listener.Adapter, net.bytebuddy.agent.builder.AgentBuilder.Listener.Compound, net.bytebuddy.agent.builder.AgentBuilder.Listener.Filtering, net.bytebuddy.agent.builder.AgentBuilder.Listener.ModuleReadEdgeCompleting, net.bytebuddy.agent.builder.AgentBuilder.Listener.NoOp, net.bytebuddy.agent.builder.AgentBuilder.Listener.StreamWriting, net.bytebuddy.agent.builder.AgentBuilder.Listener.WithErrorsOnly, net.bytebuddy.agent.builder.AgentBuilder.Listener.WithTransformationsOnly| Constructor and Description |
|---|
InstrumentationRegistryListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all collected information on this listener.
|
static InstrumentationRegistryListener |
instance() |
boolean |
isModuleActive(java.lang.String moduleKey) |
void |
onError(java.lang.String typeName,
java.lang.ClassLoader classLoader,
net.bytebuddy.utility.JavaModule module,
boolean loaded,
java.lang.Throwable throwable) |
void |
onTransformation(net.bytebuddy.description.type.TypeDescription typeDescription,
java.lang.ClassLoader classLoader,
net.bytebuddy.utility.JavaModule module,
boolean loaded,
net.bytebuddy.dynamic.DynamicType dynamicType)
We try to figure out if any applied transformation belongs to any of the known modules and if so, register what
type was transformed.
|
void |
register(KanelaConfiguration.ModuleConfiguration moduleConfig,
TypeTransformation typeTransformation)
Registers a module.
|
static java.util.Map<java.lang.String,java.util.List<java.lang.Throwable>> |
shareErrors()
Returns a map of target type to any exceptions that occurred while instrumenting that type.
|
static java.util.List<java.util.Map<java.lang.String,java.lang.String>> |
shareModules()
Returns a list of all modules known to this registry, encoded with JDK-only types that can be safely shared
across classes loaded by different ClassLoaders.
|
public static InstrumentationRegistryListener instance()
public void clear()
public void register(KanelaConfiguration.ModuleConfiguration moduleConfig, TypeTransformation typeTransformation)
public void onTransformation(net.bytebuddy.description.type.TypeDescription typeDescription,
java.lang.ClassLoader classLoader,
net.bytebuddy.utility.JavaModule module,
boolean loaded,
net.bytebuddy.dynamic.DynamicType dynamicType)
onTransformation in interface net.bytebuddy.agent.builder.AgentBuilder.ListeneronTransformation in class net.bytebuddy.agent.builder.AgentBuilder.Listener.Adapterpublic void onError(java.lang.String typeName,
java.lang.ClassLoader classLoader,
net.bytebuddy.utility.JavaModule module,
boolean loaded,
java.lang.Throwable throwable)
onError in interface net.bytebuddy.agent.builder.AgentBuilder.ListeneronError in class net.bytebuddy.agent.builder.AgentBuilder.Listener.Adapterpublic boolean isModuleActive(java.lang.String moduleKey)
public static java.util.List<java.util.Map<java.lang.String,java.lang.String>> shareModules()
public static java.util.Map<java.lang.String,java.util.List<java.lang.Throwable>> shareErrors()