Package net.bytebuddy.build.maven
Class ByteBuddyMojo.TransformationLogger
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Listener.Adapter
-
- net.bytebuddy.build.maven.ByteBuddyMojo.TransformationLogger
-
- All Implemented Interfaces:
Plugin.Engine.ErrorHandler
,Plugin.Engine.Listener
- Enclosing class:
- ByteBuddyMojo
protected static class ByteBuddyMojo.TransformationLogger extends Plugin.Engine.Listener.Adapter
APlugin.Engine.Listener
that logs several relevant events during the build.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.ErrorHandler
Plugin.Engine.ErrorHandler.Enforcing, Plugin.Engine.ErrorHandler.Failing
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.Listener
Plugin.Engine.Listener.Adapter, Plugin.Engine.Listener.Compound, Plugin.Engine.Listener.ForErrorHandler, Plugin.Engine.Listener.NoOp, Plugin.Engine.Listener.StreamWriting, Plugin.Engine.Listener.WithErrorsOnly, Plugin.Engine.Listener.WithTransformationsOnly
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.plugin.logging.Log
log
The logger to delegate to.
-
Constructor Summary
Constructors Modifier Constructor Description protected
TransformationLogger(org.apache.maven.plugin.logging.Log log)
Creates a new transformation logger.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onError(java.util.Map<TypeDescription,java.util.List<java.lang.Throwable>> throwables)
Invoked at the end of the build if at least one type transformation failed.void
onError(Plugin plugin, java.lang.Throwable throwable)
Invoked at the end of the build if a plugin could not be closed.void
onError(TypeDescription typeDescription, Plugin plugin, java.lang.Throwable throwable)
Invoked if an error occured during a plugin's application on a given type.void
onLiveInitializer(TypeDescription typeDescription, TypeDescription definingType)
Invoked if a type transformation implied a live initializer.void
onTransformation(TypeDescription typeDescription, java.util.List<Plugin> plugins)
Invoked after a type was transformed using at least one plugin.-
Methods inherited from class net.bytebuddy.build.Plugin.Engine.Listener.Adapter
onComplete, onDiscovery, onError, onIgnored, onIgnored, onManifest, onResource, onTransformation, onUnresolved
-
-
-
-
Method Detail
-
onTransformation
public void onTransformation(TypeDescription typeDescription, java.util.List<Plugin> plugins)
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked after a type was transformed using at least one plugin.- Specified by:
onTransformation
in interfacePlugin.Engine.Listener
- Overrides:
onTransformation
in classPlugin.Engine.Listener.Adapter
- Parameters:
typeDescription
- The type being transformed.plugins
- A list of plugins that were applied.
-
onError
public void onError(TypeDescription typeDescription, Plugin plugin, java.lang.Throwable throwable)
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked if an error occured during a plugin's application on a given type.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Overrides:
onError
in classPlugin.Engine.Listener.Adapter
- Parameters:
typeDescription
- The type being matched or transformed.plugin
- The plugin being applied.throwable
- The throwable that caused the error.
-
onError
public void onError(java.util.Map<TypeDescription,java.util.List<java.lang.Throwable>> throwables)
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked at the end of the build if at least one type transformation failed.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Overrides:
onError
in classPlugin.Engine.Listener.Adapter
- Parameters:
throwables
- A mapping of types that failed during transformation to the errors that were caught.
-
onError
public void onError(Plugin plugin, java.lang.Throwable throwable)
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked at the end of the build if a plugin could not be closed.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Overrides:
onError
in classPlugin.Engine.Listener.Adapter
- Parameters:
plugin
- The plugin that could not be closed.throwable
- The error that was caused when the plugin was attempted to be closed.
-
onLiveInitializer
public void onLiveInitializer(TypeDescription typeDescription, TypeDescription definingType)
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked if a type transformation implied a live initializer.- Specified by:
onLiveInitializer
in interfacePlugin.Engine.ErrorHandler
- Overrides:
onLiveInitializer
in classPlugin.Engine.Listener.Adapter
- Parameters:
typeDescription
- The type that was transformed.definingType
- The type that implies the initializer which might be the type itself or an auxiliary type.
-
-