Class Plugin.Engine.Listener.ForErrorHandler
java.lang.Object
net.bytebuddy.build.Plugin.Engine.Listener.Adapter
net.bytebuddy.build.Plugin.Engine.Listener.ForErrorHandler
- All Implemented Interfaces:
Plugin.Engine.ErrorHandler, Plugin.Engine.Listener
- Enclosing interface:
Plugin.Engine.Listener
@Enhance
public static class Plugin.Engine.Listener.ForErrorHandler
extends Plugin.Engine.Listener.Adapter
A listener decorator that forwards events to an error handler if they are applicable.
-
Nested Class Summary
Nested classes/interfaces inherited from interface Plugin.Engine.ErrorHandler
Plugin.Engine.ErrorHandler.Enforcing, Plugin.Engine.ErrorHandler.FailingNested classes/interfaces inherited from interface 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.ErrorHandlerThe error handler to delegate to. -
Constructor Summary
ConstructorsConstructorDescriptionForErrorHandler(Plugin.Engine.ErrorHandler errorHandler) Creates a new listener representation for an error handler. -
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, List<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, 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.voidonManifest(Manifest manifest) Invoked when a manifest was found or found missing.voidonResource(String name) Invoked if a resource that is not a class file is discovered.voidonUnresolved(String typeName) Invoked if a type could not be resolved.Methods inherited from class Plugin.Engine.Listener.Adapter
onComplete, onDiscovery, onIgnored, onIgnored, onTransformation, onTransformation
-
Field Details
-
errorHandler
The error handler to delegate to.
-
-
Constructor Details
-
ForErrorHandler
Creates a new listener representation for an error handler.- Parameters:
errorHandler- The error handler to delegate to.
-
-
Method Details
-
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 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
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.
-
onUnresolved
Description copied from class:Plugin.Engine.Listener.AdapterInvoked if a type could not be resolved.- Specified by:
onUnresolvedin interfacePlugin.Engine.ErrorHandler- Overrides:
onUnresolvedin classPlugin.Engine.Listener.Adapter- Parameters:
typeName- The name of the unresolved type.
-
onManifest
Description copied from class:Plugin.Engine.Listener.AdapterInvoked when a manifest was found or found missing.- Specified by:
onManifestin interfacePlugin.Engine.ErrorHandler- Overrides:
onManifestin classPlugin.Engine.Listener.Adapter- Parameters:
manifest- The located manifest ornullif no manifest was found.
-
onResource
Description copied from class:Plugin.Engine.Listener.AdapterInvoked if a resource that is not a class file is discovered.- Specified by:
onResourcein interfacePlugin.Engine.ErrorHandler- Overrides:
onResourcein classPlugin.Engine.Listener.Adapter- Parameters:
name- The name of the discovered resource.
-