Package net.bytebuddy.build
Enum Plugin.Engine.ErrorHandler.Enforcing
- java.lang.Object
-
- java.lang.Enum<Plugin.Engine.ErrorHandler.Enforcing>
-
- net.bytebuddy.build.Plugin.Engine.ErrorHandler.Enforcing
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<Plugin.Engine.ErrorHandler.Enforcing>,Plugin.Engine.ErrorHandler
- Enclosing interface:
- Plugin.Engine.ErrorHandler
public static enum Plugin.Engine.ErrorHandler.Enforcing extends java.lang.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 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 ALL_TYPES_RESOLVEDEnforces that all types could be resolved.CLASS_FILES_ONLYEnforces that a source only produces class files.MANIFEST_REQUIREDEnforces that a manifest is written to a target.NO_LIVE_INITIALIZERSEnforces that no type has a live initializer.
-
Constructor Summary
Constructors Modifier Constructor Description privateEnforcing()
-
Method Summary
All Methods Static 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.voidonLiveInitializer(TypeDescription typeDescription, TypeDescription definingType)Invoked if a type transformation implied a live initializer.voidonManifest(java.util.jar.Manifest manifest)Invoked when a manifest was found or found missing.voidonResource(java.lang.String name)Invoked if a resource that is not a class file is discovered.voidonUnresolved(java.lang.String typeName)Invoked if a type could not be resolved.static Plugin.Engine.ErrorHandler.EnforcingvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static Plugin.Engine.ErrorHandler.Enforcing[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALL_TYPES_RESOLVED
public static final Plugin.Engine.ErrorHandler.Enforcing ALL_TYPES_RESOLVED
Enforces that all types could be resolved.
-
NO_LIVE_INITIALIZERS
public static final Plugin.Engine.ErrorHandler.Enforcing NO_LIVE_INITIALIZERS
Enforces that no type has a live initializer.
-
CLASS_FILES_ONLY
public static final Plugin.Engine.ErrorHandler.Enforcing CLASS_FILES_ONLY
Enforces that a source only produces class files.
-
MANIFEST_REQUIRED
public static final Plugin.Engine.ErrorHandler.Enforcing MANIFEST_REQUIRED
Enforces that a manifest is written to a target.
-
-
Method Detail
-
values
public static Plugin.Engine.ErrorHandler.Enforcing[] 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.Enforcing c : Plugin.Engine.ErrorHandler.Enforcing.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.Enforcing 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(TypeDescription typeDescription, Plugin plugin, java.lang.Throwable throwable)
Invoked if an error occured during a plugin's application on a given type.- Specified by:
onErrorin interfacePlugin.Engine.ErrorHandler- 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)
Invoked 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- 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)
Invoked at the end of the build if at least one type transformation failed.- Specified by:
onErrorin interfacePlugin.Engine.ErrorHandler- 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)
Invoked at the end of the build if a plugin could not be closed.- Specified by:
onErrorin 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:
onLiveInitializerin 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:
onUnresolvedin interfacePlugin.Engine.ErrorHandler- Parameters:
typeName- The name of the unresolved type.
-
onManifest
public void onManifest(@MaybeNull java.util.jar.Manifest manifest)
Invoked when a manifest was found or found missing.- Specified by:
onManifestin interfacePlugin.Engine.ErrorHandler- Parameters:
manifest- The located manifest ornullif 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:
onResourcein interfacePlugin.Engine.ErrorHandler- Parameters:
name- The name of the discovered resource.
-
-