Package net.bytebuddy.build
Class Plugin.Engine.Listener.WithErrorsOnly
java.lang.Object
net.bytebuddy.build.Plugin.Engine.Listener.Adapter
net.bytebuddy.build.Plugin.Engine.Listener.WithErrorsOnly
- All Implemented Interfaces:
Plugin.Engine.ErrorHandler
,Plugin.Engine.Listener
- Enclosing interface:
Plugin.Engine.Listener
@Enhance
public static class Plugin.Engine.Listener.WithErrorsOnly
extends Plugin.Engine.Listener.Adapter
A decorator for another listener to only print error events.
-
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
FieldsModifier and TypeFieldDescriptionprivate final Plugin.Engine.Listener
The delegate to forward events to. -
Constructor Summary
ConstructorsConstructorDescriptionWithErrorsOnly
(Plugin.Engine.Listener delegate) Creates a new listener decorator that filter any event that is not related to errors. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onError
(Map<TypeDescription, List<Throwable>> throwables) Invoked at the end of the build if at least one type transformation failed.void
Invoked at the end of the build if a plugin could not be closed.void
onError
(TypeDescription typeDescription, List<Throwable> throwables) Invoked after the application of all plugins was attempted if at least one error occured during handling a given type.void
onError
(TypeDescription typeDescription, Plugin plugin, Throwable throwable) Invoked if an error occured during a plugin's application on a given type.Methods inherited from class net.bytebuddy.build.Plugin.Engine.Listener.Adapter
onComplete, onDiscovery, onIgnored, onIgnored, onLiveInitializer, onManifest, onResource, onTransformation, onTransformation, onUnresolved
-
Field Details
-
delegate
The delegate to forward events to.
-
-
Constructor Details
-
WithErrorsOnly
Creates a new listener decorator that filter any event that is not related to errors.- Parameters:
delegate
- The delegate to forward events to.
-
-
Method Details
-
onError
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
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked after the application of all plugins was attempted if at least one error occured during handling a given type.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Overrides:
onError
in classPlugin.Engine.Listener.Adapter
- Parameters:
typeDescription
- The type being transformed.throwables
- The throwables that caused errors during the application.
-
onError
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
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.
-