public static enum Plugin.Engine.ErrorHandler.Enforcing extends Enum<Plugin.Engine.ErrorHandler.Enforcing> implements Plugin.Engine.ErrorHandler
Plugin.Engine.ErrorHandler.Compound, Plugin.Engine.ErrorHandler.Enforcing, Plugin.Engine.ErrorHandler.Failing
Enum Constant and Description |
---|
ALL_TYPES_RESOLVED
Enforces that all types could be resolved.
|
CLASS_FILES_ONLY
Enforces that a source only produces class files.
|
MANIFEST_REQUIRED
Enforces that a manifest is written to a target.
|
NO_LIVE_INITIALIZERS
Enforces that no type has a live initializer.
|
Modifier and Type | Method and Description |
---|---|
void |
onError(Map<TypeDescription,List<Throwable>> throwables)
Invoked at the end of the build if at least one type transformation failed.
|
void |
onError(Plugin plugin,
Throwable throwable)
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.
|
static Plugin.Engine.ErrorHandler.Enforcing |
valueOf(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.
|
public static final Plugin.Engine.ErrorHandler.Enforcing ALL_TYPES_RESOLVED
public static final Plugin.Engine.ErrorHandler.Enforcing NO_LIVE_INITIALIZERS
public static final Plugin.Engine.ErrorHandler.Enforcing CLASS_FILES_ONLY
public static final Plugin.Engine.ErrorHandler.Enforcing MANIFEST_REQUIRED
public static Plugin.Engine.ErrorHandler.Enforcing[] values()
for (Plugin.Engine.ErrorHandler.Enforcing c : Plugin.Engine.ErrorHandler.Enforcing.values()) System.out.println(c);
public static Plugin.Engine.ErrorHandler.Enforcing valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic void onError(TypeDescription typeDescription, Plugin plugin, Throwable throwable)
onError
in interface Plugin.Engine.ErrorHandler
typeDescription
- The type being matched or transformed.plugin
- The plugin being applied.throwable
- The throwable that caused the error.public void onError(TypeDescription typeDescription, List<Throwable> throwables)
onError
in interface Plugin.Engine.ErrorHandler
typeDescription
- The type being transformed.throwables
- The throwables that caused errors during the application.public void onError(Map<TypeDescription,List<Throwable>> throwables)
onError
in interface Plugin.Engine.ErrorHandler
throwables
- A mapping of types that failed during transformation to the errors that were caught.public void onError(Plugin plugin, Throwable throwable)
onError
in interface Plugin.Engine.ErrorHandler
plugin
- The plugin that could not be closed.throwable
- The error that was caused when the plugin was attempted to be closed.public void onLiveInitializer(TypeDescription typeDescription, TypeDescription definingType)
onLiveInitializer
in interface Plugin.Engine.ErrorHandler
typeDescription
- The type that was transformed.definingType
- The type that implies the initializer which might be the type itself or an auxiliary type.public void onUnresolved(String typeName)
onUnresolved
in interface Plugin.Engine.ErrorHandler
typeName
- The name of the unresolved type.public void onManifest(Manifest manifest)
onManifest
in interface Plugin.Engine.ErrorHandler
manifest
- The located manifest or null
if no manifest was found.public void onResource(String name)
onResource
in interface Plugin.Engine.ErrorHandler
name
- The name of the discovered resource.Copyright © 2014–2020. All rights reserved.