Interface UpgradeProcessor

  • All Superinterfaces:
    java.io.Serializable
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface UpgradeProcessor
    extends java.io.Serializable
    The Function-Pointer Interface used with the Stage-3 Upgrader "Pre" and "Post" Processors.

    This is a feature that is used internally (very heavily) by the Java-HTML '.jar'-Library. There are quite a number of features that are used by the current manifestation of the Java-Doc Upgrader Tool, which haven't documented or formalized to the point where they may be included within the actual Upgrader-Tool itself, yet.

    Because features which aren't full-blown API calls (not yet anyway) are stil being utilized to upgrade Java-Doc '.html'-Files, they are instead inserted into these "Pre-Upgrader" and "Post-Upgrader" Scripts, as a part of the Build-Tool's processes.

    If it is necessary, a script may be created using any one of Java's available FunctionalInterface or Lambda-Syntax mechanisms. Once created, assigning the reference of your script to the class Config Configuration-Fields: Config.preUpgraderScript and / or Config.postUpgraderScript is how to ensure that these scripts will be run during your build's using this Build-Tool.

    Unlike the documentation for class JarInclude, providing the Java-HTML native Build-Code as an example, inline right here, of a "Pre Upgrader Script" or a "Post Upgrader Script" is patently impossible. The scripts used by this library are extremely long and do a lot of extra-cleanup routines which just wouldn't make a lot of sense.

    Suffice it to say, if there are "other things" you would like the build to do besides just the things listed in the 8 Build-Stages / Build-Steps offered by this tool, you may create a script here, and assign it to the class Config public field's Config.preUpgraderScript and / or Config.postUpgraderScript to see that your scripts are run.
    See Also:
    Config.preUpgraderScript, Config.postUpgraderScript, Config.createBuilder(String[]), RunBuild.run(BuilderRecord)


    • Method Summary

       
      @FunctionalInterface: (Lambda) Method
      Modifier and Type Method
      void accept​(BuilderRecord brec, StringBuilder logOutput)
    • Field Detail

      • serialVersionUID

        🡇     🗕  🗗  🗖
        static final long serialVersionUID
        This fulfils the SerialVersion UID requirement for all classes that implement Java's interface java.io.Serializable. Using the Serializable Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.

        Functional Interfaces are usually not thought of as Data Objects that need to be saved, stored and retrieved; however, having the ability to store intermediate results along with the lambda-functions that helped get those results can make debugging easier.
        See Also:
        Constant Field Values
        Code:
        Exact Field Declaration Expression:
         public static final long serialVersionUID = 1;
        
    • Method Detail

      • accept

        🡅     🗕  🗗  🗖
        void accept​(BuilderRecord brec,
                    java.lang.StringBuilder logOutput)
             throws java.io.IOException
        FunctionalInterface Target-Method:
        This method corresponds to the @FunctionalInterface Annotation's method requirement. It is the only non-default, non-static method in this interface, and may be the target of a Lambda-Expression or '::' (double-colon) Function-Pointer.

        May be used to implement any kind of pre-processing or post-processing during the "Stage 3" - Java-Doc Upgrader Stage. Pass any Lambda-Expression or Function-Pointer to to the BuilderRecord instance using the Config Configuration-Class fields: preUpgraderScript and postUpgraderScript
        Parameters:
        brec - Provided to this method by the Build-Mechanism for convienence. This class contains many public constant-fields.
        logOutput - May be used to print any output or log data
        Throws:
        java.io.IOException - IOException is very common during the build, and if it is thrown it will printed