Interface Plugin.WithPreprocessor

  • All Superinterfaces:
    java.lang.AutoCloseable, java.io.Closeable, ElementMatcher<TypeDescription>, Plugin
    Enclosing interface:
    Plugin

    public static interface Plugin.WithPreprocessor
    extends Plugin

    A plugin that applies a preprocessor, i.e. causes a plugin engine's execution to defer all plugin applications until all types were discovered.

    Important: The registration of a single plugin with preprocessor causes the deferral of all plugins' application that are registered with a particular plugin engine. This will reduce parallel application if a corresponding Plugin.Engine.Dispatcher is used and will increase the engine application's memory consumption. Any alternative application of a plugin outside of a Plugin.Engine might not be capable of preprocessing where the discovery callback is not invoked.

    • Method Detail

      • onPreprocess

        void onPreprocess​(TypeDescription typeDescription,
                          ClassFileLocator classFileLocator)
        Invoked upon the discovery of a type that is not explicitly ignored.
        Parameters:
        typeDescription - The discovered type.
        classFileLocator - A class file locator that can locate other types in the scope of the project.