Package net.bytebuddy.build
Enum Plugin.Engine.ErrorHandler.Failing
- java.lang.Object
-
- java.lang.Enum<Plugin.Engine.ErrorHandler.Failing>
-
- net.bytebuddy.build.Plugin.Engine.ErrorHandler.Failing
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<Plugin.Engine.ErrorHandler.Failing>
,Plugin.Engine.ErrorHandler
- Enclosing interface:
- Plugin.Engine.ErrorHandler
public static enum Plugin.Engine.ErrorHandler.Failing extends java.lang.Enum<Plugin.Engine.ErrorHandler.Failing> implements Plugin.Engine.ErrorHandler
An implementation of an error handler that fails the plugin engine application.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.build.Plugin.Engine.ErrorHandler
Plugin.Engine.ErrorHandler.Compound, Plugin.Engine.ErrorHandler.Enforcing, Plugin.Engine.ErrorHandler.Failing
-
-
Enum Constant Summary
Enum Constants Enum Constant Description FAIL_AFTER_TYPE
An error handler that fails the build after applying all plugins if at least one plugin failed.FAIL_FAST
An error handler that fails the build immediatly on the first error.FAIL_LAST
An error handler that fails the build after transforming all types if at least one plugin failed.
-
Constructor Summary
Constructors Modifier Constructor Description private
Failing()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
onError(Plugin plugin, java.lang.Throwable throwable)
Invoked at the end of the build if a plugin could not be closed.void
onLiveInitializer(TypeDescription typeDescription, TypeDescription definingType)
Invoked if a type transformation implied a live initializer.void
onManifest(java.util.jar.Manifest manifest)
Invoked when a manifest was found or found missing.void
onResource(java.lang.String name)
Invoked if a resource that is not a class file is discovered.void
onUnresolved(java.lang.String typeName)
Invoked if a type could not be resolved.static Plugin.Engine.ErrorHandler.Failing
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Plugin.Engine.ErrorHandler.Failing[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface net.bytebuddy.build.Plugin.Engine.ErrorHandler
onError, onError, onError
-
-
-
-
Enum Constant Detail
-
FAIL_FAST
public static final Plugin.Engine.ErrorHandler.Failing FAIL_FAST
An error handler that fails the build immediatly on the first error.
-
FAIL_AFTER_TYPE
public static final Plugin.Engine.ErrorHandler.Failing FAIL_AFTER_TYPE
An error handler that fails the build after applying all plugins if at least one plugin failed.
-
FAIL_LAST
public static final Plugin.Engine.ErrorHandler.Failing FAIL_LAST
An error handler that fails the build after transforming all types if at least one plugin failed.
-
-
Method Detail
-
values
public static Plugin.Engine.ErrorHandler.Failing[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Plugin.Engine.ErrorHandler.Failing c : Plugin.Engine.ErrorHandler.Failing.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Plugin.Engine.ErrorHandler.Failing valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
onError
public void onError(Plugin plugin, java.lang.Throwable throwable)
Invoked at the end of the build if a plugin could not be closed.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Parameters:
plugin
- The plugin that could not be closed.throwable
- The error that was caused when the plugin was attempted to be closed.
-
onLiveInitializer
public void onLiveInitializer(TypeDescription typeDescription, TypeDescription definingType)
Invoked if a type transformation implied a live initializer.- Specified by:
onLiveInitializer
in interfacePlugin.Engine.ErrorHandler
- 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
public void onUnresolved(java.lang.String typeName)
Invoked if a type could not be resolved.- Specified by:
onUnresolved
in interfacePlugin.Engine.ErrorHandler
- Parameters:
typeName
- The name of the unresolved type.
-
onManifest
public void onManifest(java.util.jar.Manifest manifest)
Invoked when a manifest was found or found missing.- Specified by:
onManifest
in interfacePlugin.Engine.ErrorHandler
- Parameters:
manifest
- The located manifest ornull
if no manifest was found.
-
onResource
public void onResource(java.lang.String name)
Invoked if a resource that is not a class file is discovered.- Specified by:
onResource
in interfacePlugin.Engine.ErrorHandler
- Parameters:
name
- The name of the discovered resource.
-
-