Package net.bytebuddy.build
Class Plugin.Engine.Listener.WithTransformationsOnly
- java.lang.Object
-
- net.bytebuddy.build.Plugin.Engine.Listener.Adapter
-
- net.bytebuddy.build.Plugin.Engine.Listener.WithTransformationsOnly
-
- All Implemented Interfaces:
Plugin.Engine.ErrorHandler
,Plugin.Engine.Listener
- Enclosing interface:
- Plugin.Engine.Listener
@Enhance public static class Plugin.Engine.Listener.WithTransformationsOnly extends Plugin.Engine.Listener.Adapter
A decorator for another listener to only print transformation and 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
Fields Modifier and Type Field Description private Plugin.Engine.Listener
delegate
The delegate to forward events to.
-
Constructor Summary
Constructors Constructor Description WithTransformationsOnly(Plugin.Engine.Listener delegate)
Creates a new listener decorator that filter any event that is not related to transformation or errors.
-
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, java.util.List<java.lang.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, java.lang.Throwable throwable)
Invoked if an error occured during a plugin's application on a given type.void
onTransformation(TypeDescription typeDescription, java.util.List<Plugin> plugins)
Invoked after a type was transformed using at least one plugin.void
onTransformation(TypeDescription typeDescription, Plugin plugin)
Invoked after a type was transformed using a specific plugin.-
Methods inherited from class net.bytebuddy.build.Plugin.Engine.Listener.Adapter
onComplete, onDiscovery, onIgnored, onIgnored, onLiveInitializer, onManifest, onResource, onUnresolved
-
-
-
-
Field Detail
-
delegate
private final Plugin.Engine.Listener delegate
The delegate to forward events to.
-
-
Constructor Detail
-
WithTransformationsOnly
public WithTransformationsOnly(Plugin.Engine.Listener delegate)
Creates a new listener decorator that filter any event that is not related to transformation or errors.- Parameters:
delegate
- The delegate to forward events to.
-
-
Method Detail
-
onTransformation
public void onTransformation(TypeDescription typeDescription, Plugin plugin)
Description copied from class:Plugin.Engine.Listener.Adapter
Invoked after a type was transformed using a specific plugin.- Specified by:
onTransformation
in interfacePlugin.Engine.Listener
- Overrides:
onTransformation
in classPlugin.Engine.Listener.Adapter
- Parameters:
typeDescription
- The type being transformed.plugin
- The plugin that was applied.
-
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(TypeDescription typeDescription, java.util.List<java.lang.Throwable> throwables)
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
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.
-
-