Package net.bytebuddy.build
Enum Class Plugin.Engine.ErrorHandler.Enforcing
java.lang.Object
java.lang.Enum<Plugin.Engine.ErrorHandler.Enforcing>
net.bytebuddy.build.Plugin.Engine.ErrorHandler.Enforcing
- All Implemented Interfaces:
Serializable
,Comparable<Plugin.Engine.ErrorHandler.Enforcing>
,Constable
,Plugin.Engine.ErrorHandler
- Enclosing interface:
Plugin.Engine.ErrorHandler
public static enum Plugin.Engine.ErrorHandler.Enforcing
extends Enum<Plugin.Engine.ErrorHandler.Enforcing>
implements Plugin.Engine.ErrorHandler
An error handler that enforces certain properties of the transformation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
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 ConstantsEnum ConstantDescriptionEnforces that all types could be resolved.Enforces that a source only produces class files.Enforces that a manifest is written to a target.Enforces that no type has a live initializer. -
Constructor Summary
Constructors -
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.void
onLiveInitializer
(TypeDescription typeDescription, TypeDescription definingType) Invoked if a type transformation implied a live initializer.void
onManifest
(Manifest manifest) Invoked when a manifest was found or found missing.void
onResource
(String name) Invoked if a resource that is not a class file is discovered.void
onUnresolved
(String typeName) Invoked if a type could not be resolved.Returns the enum constant of this class with the specified name.static Plugin.Engine.ErrorHandler.Enforcing[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ALL_TYPES_RESOLVED
Enforces that all types could be resolved. -
NO_LIVE_INITIALIZERS
Enforces that no type has a live initializer. -
CLASS_FILES_ONLY
Enforces that a source only produces class files. -
MANIFEST_REQUIRED
Enforces that a manifest is written to a target.
-
-
Constructor Details
-
Enforcing
private Enforcing()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
onError
Invoked if an error occured during a plugin's application on a given type.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Parameters:
typeDescription
- The type being matched or transformed.plugin
- The plugin being applied.throwable
- The throwable that caused the error.
-
onError
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
- Parameters:
typeDescription
- The type being transformed.throwables
- The throwables that caused errors during the application.
-
onError
Invoked at the end of the build if at least one type transformation failed.- Specified by:
onError
in interfacePlugin.Engine.ErrorHandler
- Parameters:
throwables
- A mapping of types that failed during transformation to the errors that were caught.
-
onError
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
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
Invoked if a type could not be resolved.- Specified by:
onUnresolved
in interfacePlugin.Engine.ErrorHandler
- Parameters:
typeName
- The name of the unresolved type.
-
onManifest
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
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.
-