Package Torello.Java.Build
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 availableFunctionalInterface
or Lambda-Syntax mechanisms. Once created, assigning the reference of your script to the classConfig
Configuration-Fields:Config.preUpgraderScript
and / orConfig.postUpgraderScript
is how to ensure that these scripts will be run during your build's using this Build-Tool.
Unlike the documentation for classJarInclude
, 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 classConfig
public field'sConfig.preUpgraderScript
and / orConfig.postUpgraderScript
to see that your scripts are run.- See Also:
Config.preUpgraderScript
,Config.postUpgraderScript
,Config.createBuilder(String[])
,RunBuild.run(BuilderRecord)
Hi-Lited Source-Code:- View Here: Torello/Java/Build/UpgradeProcessor.java
- Open New Browser-Tab: Torello/Java/Build/UpgradeProcessor.java
File Size: 3,311 Bytes Line Count: 63 '\n' Characters Found
-
-
Field Summary
Fields Modifier and Type Field static long
serialVersionUID
-
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'sinterface java.io.Serializable
. Using theSerializable
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 theBuilderRecord
instance using theConfig
Configuration-Class fields:preUpgraderScript
andpostUpgraderScript
- 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
-
-