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
A
Plugin.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.FailingNested 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
FieldsModifier and TypeFieldDescriptionprivate final org.apache.maven.plugin.logging.LogThe logger to delegate to. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTransformationLogger(org.apache.maven.plugin.logging.Log log) Creates a new transformation logger. -
Method Summary
Modifier and TypeMethodDescriptionvoidonError(Map<TypeDescription, List<Throwable>> throwables) Invoked at the end of the build if at least one type transformation failed.voidInvoked at the end of the build if a plugin could not be closed.voidonError(TypeDescription typeDescription, Plugin plugin, Throwable throwable) Invoked if an error occured during a plugin's application on a given type.voidonLiveInitializer(TypeDescription typeDescription, TypeDescription definingType) Invoked if a type transformation implied a live initializer.voidonTransformation(TypeDescription typeDescription, 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
-
Field Details
-
log
private final org.apache.maven.plugin.logging.Log logThe logger to delegate to.
-
-
Constructor Details
-
TransformationLogger
protected TransformationLogger(org.apache.maven.plugin.logging.Log log) Creates a new transformation logger.- Parameters:
log- The logger to delegate to.
-
-
Method Details
-
onTransformation
Description copied from class:Plugin.Engine.Listener.AdapterInvoked after a type was transformed using at least one plugin.- Specified by:
onTransformationin interfacePlugin.Engine.Listener- Overrides:
onTransformationin classPlugin.Engine.Listener.Adapter- Parameters:
typeDescription- The type being transformed.plugins- A list of plugins that were applied.
-
onError
Description copied from class:Plugin.Engine.Listener.AdapterInvoked if an error occured during a plugin's application on a given type.- Specified by:
onErrorin interfacePlugin.Engine.ErrorHandler- Overrides:
onErrorin 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
Description copied from class:Plugin.Engine.Listener.AdapterInvoked at the end of the build if at least one type transformation failed.- Specified by:
onErrorin interfacePlugin.Engine.ErrorHandler- Overrides:
onErrorin classPlugin.Engine.Listener.Adapter- Parameters:
throwables- A mapping of types that failed during transformation to the errors that were caught.
-
onError
Description copied from class:Plugin.Engine.Listener.AdapterInvoked at the end of the build if a plugin could not be closed.- Specified by:
onErrorin interfacePlugin.Engine.ErrorHandler- Overrides:
onErrorin 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
Description copied from class:Plugin.Engine.Listener.AdapterInvoked if a type transformation implied a live initializer.- Specified by:
onLiveInitializerin interfacePlugin.Engine.ErrorHandler- Overrides:
onLiveInitializerin 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.
-