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.ListenerdelegateThe 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 voidonError(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.voidonError(Plugin plugin, java.lang.Throwable throwable)Invoked at the end of the build if a plugin could not be closed.voidonError(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.voidonError(TypeDescription typeDescription, Plugin plugin, java.lang.Throwable throwable)Invoked if an error occured during a plugin's application on a given type.voidonTransformation(TypeDescription typeDescription, java.util.List<Plugin> plugins)Invoked after a type was transformed using at least one plugin.voidonTransformation(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.AdapterInvoked after a type was transformed using a specific plugin.- Specified by:
onTransformationin interfacePlugin.Engine.Listener- Overrides:
onTransformationin 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.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
public void onError(TypeDescription typeDescription, Plugin plugin, java.lang.Throwable throwable)
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
public void onError(TypeDescription typeDescription, java.util.List<java.lang.Throwable> throwables)
Description copied from class:Plugin.Engine.Listener.AdapterInvoked after the application of all plugins was attempted if at least one error occured during handling a given type.- Specified by:
onErrorin interfacePlugin.Engine.ErrorHandler- Overrides:
onErrorin 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.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
public void onError(Plugin plugin, java.lang.Throwable throwable)
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.
-
-