Class Plugin.Engine.ErrorHandler.Compound

    • Field Detail

      • errorHandlers

        private final java.util.List<Plugin.Engine.ErrorHandler> errorHandlers
        The error handlers that are represented by this instance.
    • Constructor Detail

      • Compound

        public Compound​(Plugin.Engine.ErrorHandler... errorHandler)
        Creates a new compound error handler.
        Parameters:
        errorHandler - The error handlers that are represented by this instance.
      • Compound

        public Compound​(java.util.List<? extends Plugin.Engine.ErrorHandler> errorHandlers)
        Creates a new compound error handler.
        Parameters:
        errorHandlers - The error handlers that are represented by this instance.
    • Method Detail

      • 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:
        onError in interface Plugin.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:
        onError in interface Plugin.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:
        onError in interface Plugin.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:
        onError in interface Plugin.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 interface Plugin.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 interface Plugin.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 interface Plugin.Engine.ErrorHandler
        Parameters:
        manifest - The located manifest or null 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 interface Plugin.Engine.ErrorHandler
        Parameters:
        name - The name of the discovered resource.