Package Torello.Java.Build
Class BuilderRecord
- java.lang.Object
-
- Torello.Java.Build.BuilderRecord
-
public class BuilderRecord extends java.lang.Object
This class contains all configurations that are needed to run a build. This class contains no publicly exposed methods. Rather this is strictly a constant "Record Class" that is extremely similar to the JDK 21+ LTS Records. There are a few of non-public Package-Private fields inside this class. All fields which ar adorned with thepublic
-Modifier are also declared as {code 'final'}.Internally-Used Class: The exposed API here is not needed to the End-User.
This class is generated, internally, as a Configuration-Class to be passed to the 8 Build-Stages which are executed by this Build-Tool. The contents of this class have been thoroughly documented and explained, solely for the purpose of explaining, exactly, the steps this Tool is taking during a Build!
This class is not declared Package-Private in order to facilitate providing a more detailed explanation of what this Build-Tool entails, and not because it is important to the End-User when running a build.
Generating an Instance:
An instance of this class may be generated by making a call to the classConfig
methodConfig.createBuilder(String[])
.
The Data-Contents of this class are created based on data from the following sources:-
Config
Instance. Performing a Build with this Tool requires that the user provide an instance of classConfig
, which should contain all of the needed Configurations to compile, document, archive and synchronize the generated archive files and'.html'
-Files to some Cloud-Storage System. -
String[]
Instance. ThisBuilderRecord
also requires the actual Command-Line Switches that the "User's End User" has provided at the Command-Line. This is, actually, just the Java-ProvidedString[]
-Array that has been passed at the Command-Line Terminal-Shell Window to the User'spublic static void main
method.
Checking this Record's Contents anyway:
Though there should be no need to actually monitor the values assigned to thepublic
fields in this class, most of them have been declaredpublic
. This is made possible, because they are also'final'
and cannot be changed. Retrieving the instance of this class that is ultimately used by theRunBuild.run(BuilderRecord)
method is relatively easy.
Here are the simple steps needed to actually perform a Build, using this Tool, once the appropriate settings have been assigned to an instance of classConfig
!.
Example:
Config config = new Config(); // Perform as many assignments to the Configuration-Fields as is necessary! // Below are just a few lines that are used to build the Java-HTML JAR. config.LOCAL_JAVADOC_DIR = "javadoc/"; config.PROJECT_NAME = "JavaHTML"; config.VERSION_MAJOR_NUMBER = 1; config.VERSION_MINOR_NUMBER = 8; config.JAVA_RELEASE_NUM_SWITCH = 11; // NOTE: 'argv' is obtained from the method's header, which should be as follows: // ==> public static void main(String[] argv) BuilderRecord rec = config.createBuilder(argv); // HERE: You may review the settings that have been applied using the Command-Line // Input retrieved from "The User's User" by simply inspecting the fields present / in the BuilderRecord instance that was returned from "Config.createBuilder" RunBuild.run(rec);
Hi-Lited Source-Code:- View Here: Torello/Java/Build/BuilderRecord.java
- Open New Browser-Tab: Torello/Java/Build/BuilderRecord.java
File Size: 47,454 Bytes Line Count: 1,056 '\n' Characters Found
-
-
-
Field Summary
Primary BuilderRecord Configurations Modifier and Type Field String
CLASS_PATH_STR
CLI
cli
CloudSync
cloudSync
String
HOME_DIR
ReadOnlyList<JarInclude.Descriptor>
jarIncludes
ReadOnlyList<BuildPackage>
packageList
Binary / Executable Locations Modifier and Type Field String
JAVAC_BIN
String
JAVADOC_BIN
Project Name & Version-Numbers Modifier and Type Field String
PROJECT_NAME
byte
VERSION_MAJOR_NUMBER
byte
VERSION_MINOR_NUMBER
Stage 1: 'javac' Configurations Modifier and Type Field ReadOnlyList<String>
extraSwitchesJAVAC
byte
JAVA_RELEASE_NUM_SWITCH
boolean
USE_XDIAGS_SWITCH
boolean
USE_XLINT_SWITCH
Stage 2: 'javadoc' Configurations Modifier and Type Field ReadOnlyList<String>
extraSwitchesJAVADOC
byte
JAVADOC_VER
String
LOCAL_JAVADOC_DIR
boolean
NO_JAVADOC_FRAMES_SWITCH
Stage 3: Upgrader Settings Modifier and Type Field String
FAVICON
UpgradeProcessor
postUpgraderScript
UpgradeProcessor
preUpgraderScript
Upgrade
upgrader
Stage 4: '.tar' & '.jar' File Settings Modifier and Type Field String
JAR_FILE
String
JAR_FILE_NAME
String
JAVADOC_TAR_FILE
String
TAR_FILE
String
TAR_SOURCE_DIR
Build Configuration Data-Record's Log Output File-Name Modifier and Type Field static String
BUILDER_RECORD_LOG_FILENAME
-
-
-
Field Detail
-
BUILDER_RECORD_LOG_FILENAME
public static final java.lang.String BUILDER_RECORD_LOG_FILENAME
- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
public static final String BUILDER_RECORD_LOG_FILENAME = "Builder-Record.log.sb";
-
HOME_DIR
public final java.lang.String HOME_DIR
Used during the JAR-Build (Stage 4). TO BE EXPLAINED AT A LATER DATE.- See Also:
Config.HOME_DIR
- Code:
- Exact Field Declaration Expression:
public final String HOME_DIR;
-
LOCAL_JAVADOC_DIR
public final java.lang.String LOCAL_JAVADOC_DIR
ThisString
contains either the absolute, or the relative, path to the on-disk location of the directory wherejavadoc
has left its output.
Validity-Checking:
A Directory-Check is not performed by classConfig's
validate
method. Often, when theBuilder
instance is constructed, the'javadoc/'
output directory does not exist as it hasn't yet been created by the Java-Doc Tool yet.'javadoc'
isn't run / executed until Build-Stage 2.
ClassConfig's
validate
method will throwNullPointerException
if fieldConfig.LOCAL_JAVADOC_DIR
has been left null.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.LOCAL_JAVADOC_DIR
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.LOCAL_JAVADOC_DIR = config.LOCAL_JAVADOC_DIR;
- See Also:
Config.LOCAL_JAVADOC_DIR
- Code:
- Exact Field Declaration Expression:
public final String LOCAL_JAVADOC_DIR;
-
PROJECT_NAME
public final java.lang.String PROJECT_NAME
This is a small name-String
for the Project.
Validity-Checking:
This field's value is checked for validity by a Regular-Expressionvalidator
- publicly available in classConfig
.
ClassConfig's
validate
method will throwNullPointerException
if fieldConfig.PROJECT_NAME
has been left null.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.PROJECT_NAME
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.PROJECT_NAME = config.PROJECT_NAME;
- See Also:
Config.PROJECT_NAME
,Config.projectNameValidator
- Code:
- Exact Field Declaration Expression:
public final String PROJECT_NAME;
-
VERSION_MAJOR_NUMBER
public final byte VERSION_MAJOR_NUMBER
The Project must have a "Version Number". In this project - JavaHTML 1.8, at the writing of this JavaDoc Comment the "Major Version Number" is'1'
, while the "Minor Version Number" is'8'
.
Validity-Checking:
This number must be a positive integer, and it is checked for validity by classConfig's
validate
method.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.VERSION_MAJOR_NUMBER
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.VERSION_MAJOR_NUMBER = config.VERSION_MAJOR_NUMBER;
- See Also:
VERSION_MINOR_NUMBER
,Config.VERSION_MAJOR_NUMBER
- Code:
- Exact Field Declaration Expression:
public final byte VERSION_MAJOR_NUMBER;
-
VERSION_MINOR_NUMBER
public final byte VERSION_MINOR_NUMBER
The Project-Version Minor-Number.
Validity-Checking:
This number must be a positive integer, and it is checked for validity by classConfig's
validate
method.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.VERSION_MINOR_NUMBER
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.VERSION_MINOR_NUMBER = config.VERSION_MINOR_NUMBER;
- See Also:
VERSION_MAJOR_NUMBER
,Config.VERSION_MINOR_NUMBER
- Code:
- Exact Field Declaration Expression:
public final byte VERSION_MINOR_NUMBER;
-
JAVAC_BIN
public final java.lang.String JAVAC_BIN
This must contain the direct path from the current working directory to the'javac'
binary-file. ThisString
-Configuration names the executable used by Build-Stage 1.
Validity-Checking:
This parameter is not checked for validity, but the Java-Compiler Build-Stage Class,S01_JavaCompiler
, will throw exceptions if thisString
doesn't point to a valid binary or executable file.
ClassConfig's
validate
method will throwNullPointerException
if fieldConfig.JAVAC_BIN
has been left null.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.JAVAC_BIN
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.JAVAC_BIN = config.JAVAC_BIN;
- See Also:
Config.JAVAC_BIN
,S01_JavaCompiler
- Code:
- Exact Field Declaration Expression:
public final String JAVAC_BIN;
-
JAVADOC_BIN
public final java.lang.String JAVADOC_BIN
This must contain the direct path from the current working directory to the'javadoc'
binary-file. ThisString
-Configuration names the executable used by Build-Stage 1.
Validity-Checking:
This parameter is not checked for validity, but the Javadoc Build-Stage Class,S02_JavaDoc
, will throw exceptions if thisString
doesn't point to a valid binary or executable file.
ClassConfig's
validate
method will throwNullPointerException
if fieldConfig.JAVADOC_BIN
has been left null.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.JAVADOC_BIN
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.JAVADOC_BIN = config.JAVADOC_BIN;
- See Also:
Config.JAVADOC_BIN
,S02_JavaDoc
- Code:
- Exact Field Declaration Expression:
public final String JAVADOC_BIN;
-
JAVA_RELEASE_NUM_SWITCH
public final byte JAVA_RELEASE_NUM_SWITCH
This Configuration-Field may be used to request that the Build-Tool insert the'javac'
Command-Line Switch'--release XX'
to the'javac'
Command Invocation. The release switch asks that the Java-Compiler generate Java Byte-Code that is that is consistent with the Byte-Code for the JDK-Release'X'
.
If'X'
were passed'11'
, the Java-Compiler would generate Java Byte-Code that is consistent with the JDK-11 LTS (Released in Year 2018).
This parameter is not checked for validity, but the Java-Compiler will generate error messages (instead of compiling) if the Release-Number isn't valid. If you are using JDK-11, and pass'21'
to this Configuration-Field,'javac'
will obviously complain.
The default value for this field is'-1'
. Any negative number (or zero) assigned to this field will implicitly tell the Stage 1 Builder-Class that using a'--release'
switch is not necessary, and should be left off when compiling'.java'
Files.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.JAVA_RELEASE_NUM_SWITCH
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.JAVA_RELEASE_NUM_SWITCH = config.JAVA_RELEASE_NUM_SWITCH;
- See Also:
Config.JAVA_RELEASE_NUM_SWITCH
,S01_JavaCompiler
- Code:
- Exact Field Declaration Expression:
public final byte JAVA_RELEASE_NUM_SWITCH;
-
JAVADOC_VER
public final byte JAVADOC_VER
Currently this is an unused Configuration-Field. It is not checked for validity. When this class is constructed, this field is automatically assigned to the value of the fieldConfig.JAVADOC_VER
.- See Also:
Config.JAVADOC_VER
,S02_JavaDoc
- Code:
- Exact Field Declaration Expression:
public final byte JAVADOC_VER;
-
FAVICON
public final java.lang.String FAVICON
ContainsFAVICON
Image File-Name, to be used by the Stage 3 Build-ClassS03_Upgrade
. When this Configuration-Field is non-null, the Upgrade-Stage will copy favicon file into theLOCAL_JAVADOC_DIR
.
This Configuration-Field may be null - which is the default value assigned toConfig.FAVICON
. When it is, no favicon file is copied to the root'javadoc/'
directory.
Validity-Checking:
ThisString
-Field, when non-null, is checked whether or not it points to an actual Image-File, that both exists and is accessible on the File-System. ClassConfig's
validate
method will throw aFileNotFoundException
if this check fails.
If classIF
is unable to properly guess the Image-Type based on its File-Name, then anUnrecognizedImageExtException
is thrown by the validator method.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.FAVICON
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.FAVICON = config.FAVICON;
- See Also:
Config.FAVICON
,S03_Upgrade
- Code:
- Exact Field Declaration Expression:
public final String FAVICON;
-
TAR_SOURCE_DIR
public final java.lang.String TAR_SOURCE_DIR
This class specifies the Root Source-Code Directory containing all'.java'
Files,'.class'
Files, and any configurations needed for the build. The Stage 4 Builder-ClassS04_TarJar
invokes the OS Command'tar'
around this directory to create a Project Backup-File.
The name given the Project Tar-Backup File will just be theString
provided toPROJECT_NAME
, followed by theVERSION_MAJOR_NUMBER
andVERSION_MINOR_NUMBER
.
Validity-Checking:
ThisString
-Field may not be null, orNullPointerException
throws. Furthermore theConfig
validate
method will ensure that thisString
points to a valid and accessible File-System Directory-Name.
If this isn't a valid directory, aFileNotFoundException
will throw. Keep in mind thatFileNotFoundException
is a Java Checked-Exception which inheritsIOException
.
Configuration-Field Use:
This field is very simply used in the Stage 4 Build-ClassS04_TarJar
as follows. The following code snippet was copied on March 4th, 2024:
// Shell-Constructor Parameters used: // (outputAppendable, commandStrAppendable, standardOutput, errorOutput) Shell shell = new Shell(SB_TAR, new BiAppendable(SB_TAR, System.out), null, null); // JavaHTML-1.x.tar.gz CHECK( shell.COMMAND( "tar", new String[] { "-cvzf", builder.TAR_FILE, builder.TAR_SOURCE_DIR } ));
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.TAR_SOURCE_DIR
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.TAR_SOURCE_DIR = config.TAR_SOURCE_DIR;
- See Also:
Config.TAR_SOURCE_DIR
,TAR_FILE
,S04_TarJar
,S06_SyncTarJar
- Code:
- Exact Field Declaration Expression:
public final String TAR_SOURCE_DIR;
-
preUpgraderScript
public final UpgradeProcessor preUpgraderScript
In Java-HTML there are a few Upgrade-Stage (Stage 3) processes that need to be executed before the actualupgrade
can run. All of the processes currently in the'preUpgraderScript'
are on a general "To Do List" for being moved into the actual Upgrade-API.
This Configuration-Field may be null, and if it is, it is ignored. The Stage 3 Build-ClassS03_Upgrade
simply runs the following code, below. This snippet was block-copied directly from'S03_Upgrade.upgrade'
.
builder.timers.startStage03(); Printing.startStep(3); // This is used as a Log-File Collector StringBuilder sb = new StringBuilder(); // Check if there is a User-Provided "Pre-Upgrade Script", if so, then run it. if (builder.preUpgraderScript != null) builder.preUpgraderScript.accept(builder, sb); sb.append("... Note to Console about Starting Build ..."); // And now start the actual Upgrade Stats result = builder.upgrader.upgrade();
Clearly, a validity check on this Configuration-Field isn't possible.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.preUpgraderScript
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.preUpgraderScript = config.preUpgraderScript;
- See Also:
Config.preUpgraderScript
,postUpgraderScript
,Config.postUpgraderScript
,S03_Upgrade
- Code:
- Exact Field Declaration Expression:
public final UpgradeProcessor preUpgraderScript;
-
postUpgraderScript
public final UpgradeProcessor postUpgraderScript
This functions identically to thepreUpgraderScript
, but is executed immediately after ClassS03_Upgrade
has run to completion.
This field may be null, and if it is it will be silently ignored. No validity checks are executed for this Configuration-Field.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.postUpgraderScript
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.postUpgraderScript = config.postUpgraderScript;
- See Also:
Config.postUpgraderScript
,preUpgraderScript
,Config.preUpgraderScript
,S03_Upgrade
- Code:
- Exact Field Declaration Expression:
public final UpgradeProcessor postUpgraderScript;
-
extraSwitchesJAVAC
public final ReadOnlyList<java.lang.String> extraSwitchesJAVAC
Setting values for thisString[]
-Array allows a user to provide extra or additional Command-Line switches to the Java-Compiler if it is invoked.
Validity Checking:
No validity checks are done for the contents of these'javac'
"Extra Switches". However, if any faulty or erroneous switch elements in the User-ProvidedString[]
-Array are provided, then the Stage 1 Build-ClassS01_JavaCompiler
will likely through exceptions when if it is invoked.
CopyingConfig.extraSwitchesJAVAC
:
The following is how this field is copied from the contents of classConfig
(a User-Provided class):
// Config.extraSwitchesJAVAC ==> String[] // Builder.extraSwitchesJAVAC ==> ReadOnlyList<String> this.extraSwitchesJAVAC = ((config.extraSwitchesJAVAC == null) || (config.extraSwitchesJAVAC.length == 0)) ? null : ReadOnlyList.of(config.extraSwitchesJAVAC);
- See Also:
Config.extraSwitchesJAVAC
,ReadOnlyList
,S01_JavaCompiler
- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<String> extraSwitchesJAVAC;
-
extraSwitchesJAVADOC
public final ReadOnlyList<java.lang.String> extraSwitchesJAVADOC
Setting values for thisString[]
-Array allows a user to provide extra or additional Command-Line switches to the'javadoc'
Tool if it is invoked.
Validity Checking:
No validity checks are done for the contents of these'javadoc'
"Extra Switches". However, if any faulty or erroneous switch elements in the User-ProvidedString[]
-Array are provided, then the Stage 2 Build-ClassS02_JavaDoc
will likely through exceptions when if it is invoked.
CopyingConfig.extraSwitchesJAVADOC
:
The following is how this field is copied from contents of User-Provided classConfig
:
// Config.extraSwitchesJAVADOC ==> String[] // Builder.extraSwitchesJAVADOC ==> ReadOnlyList<String> this.extraSwitchesJAVADOC = ((config.extraSwitchesJAVADOC == null) || (config.extraSwitchesJAVADOC.length == 0)) ? null : ReadOnlyList.of(config.extraSwitchesJAVADOC);
- See Also:
Config.extraSwitchesJAVADOC
,ReadOnlyList
,S02_JavaDoc
- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<String> extraSwitchesJAVADOC;
-
upgrader
public final Upgrade upgrader
- See Also:
Config.upgrader
,S03_Upgrade
- Code:
- Exact Field Declaration Expression:
public final Upgrade upgrader;
-
TAR_FILE
public final java.lang.String TAR_FILE
The Computed File-Name for the Project-Wide'.tar'
Backup-File.
This Configuration-Field is computed using other fields, and cannot be "supplied" by the User. Below is the code used to generate this File-Name / Field.
// For Java-HTML, this would be, (for example) - "1.8" final String NUM = VERSION_MAJOR_NUMBER + "." + VERSION_MINOR_NUMBER; // For Project "JavaHTML", this would be "JavaHTML-1.8.tar.gz" this.TAR_FILE = this.PROJECT_NAME + "-" + NUM + ".tar.gz";
- See Also:
PROJECT_NAME
,VERSION_MAJOR_NUMBER
,VERSION_MINOR_NUMBER
,S04_TarJar
,S06_SyncTarJar
- Code:
- Exact Field Declaration Expression:
public final String TAR_FILE;
-
JAR_FILE
public final java.lang.String JAR_FILE
The Computed File-Name for the Project's Distribution'.jar'
File.
This Configuration-Field is computed using other fields, and cannot be "supplied" by the User. Below is the code used to generate this File-Name / Field.
// For Java-HTML, this would be, (for example) - "1.8" final String NUM = VERSION_MAJOR_NUMBER + "." + VERSION_MINOR_NUMBER; // For Project "JavaHTML", this would be "JavaHTML-1.8.jar" this.JAR_FILE = this.PROJECT_NAME + "-" + NUM + ".jar";
- See Also:
PROJECT_NAME
,VERSION_MAJOR_NUMBER
,VERSION_MINOR_NUMBER
,S04_TarJar
,S06_SyncTarJar
- Code:
- Exact Field Declaration Expression:
public final String JAR_FILE;
-
JAVADOC_TAR_FILE
public final java.lang.String JAVADOC_TAR_FILE
The Computed File-Name for the Project's Javadoc Documentation'.tar.gz'
File.
This Configuration-Field is computed using other fields, and cannot be "supplied" by the User. Below is the code used to generate this File-Name / Field.
// For Java-HTML, this would be, (for example) - "1.8" final String NUM = VERSION_MAJOR_NUMBER + "." + VERSION_MINOR_NUMBER; // For Project "JavaHTML", this would be "JavaHTML-javadoc-1.8.tar" this.JAVADOC_TAR_FILE = this.PROJECT_NAME + "-javadoc-" + NUM + ".tar";
- See Also:
PROJECT_NAME
,VERSION_MAJOR_NUMBER
,VERSION_MINOR_NUMBER
,S04_TarJar
,S06_SyncTarJar
- Code:
- Exact Field Declaration Expression:
public final String JAVADOC_TAR_FILE;
-
JAR_FILE_NAME
public final java.lang.String JAR_FILE_NAME
This is an auto-generated field, that utilizes theConfig
-Class FieldConfig.JAR_FILE_MOVE_DIR
. When this field is non-null, the'.jar'
File that is generated by the Stage 4 Build-ClassS04_TarJar
is copied to the directory specified.
this.JAR_FILE_NAME = (config.JAR_FILE_MOVE_DIR != null) ? (config.JAR_FILE_MOVE_DIR + this.PROJECT_NAME + ".jar") : null;
- See Also:
Config.JAR_FILE_MOVE_DIR
,S04_TarJar
,S06_SyncTarJar
- Code:
- Exact Field Declaration Expression:
public final String JAR_FILE_NAME;
-
CLASS_PATH_STR
public final java.lang.String CLASS_PATH_STR
This is the classpath that is passed to the Stage 1 Build-ClassS01_JavaCompiler
.
This field's value is computed and assigned by a package-only visible initializer method in classConfig
.- See Also:
S01_JavaCompiler
- Code:
- Exact Field Declaration Expression:
public final String CLASS_PATH_STR;
-
USE_XLINT_SWITCH
public final boolean USE_XLINT_SWITCH
The helps the Build-Logic decide whether to use the Java-Compiler Switch-Xlint:all
. The default behavior is that the Java-Compiler will be invoked using that switch for all'.java'
Files that are being compiled.
The default behavior assigned in Configuration-ClassConfig
can easily be changed by reassigning the necessary value to fieldConfig.USE_XLINT_SWITCH
. When this field is reassiged a newboolean
, any invocation of theBuilder
's Java-Compiler Stage will check whether to use the-Xlint:all
, based on this field's value.
On top ofConfig.USE_XLINT_SWITCH
, a user has the option of passing the Command-Line Wwitch-TXL
when invoking the Java-Compiler Build-Stage which, in effect, toggles whatever value was set by the originalConfig.USE_XLINT_SWITCH
setting. (This may be done when invoking'Builder'
from the CLI).
This may be more clearly seen in the code used to assign this field's value:
this.USE_XLINT_SWITCH = this.cli.aor.OVERRIDE_TOGGLE_USE_XLINT_SWITCH ? (! config.USE_XLINT_SWITCH) : config.USE_XLINT_SWITCH;
- See Also:
Config.USE_XLINT_SWITCH
,AuxiliaryOptRecord.OVERRIDE_TOGGLE_USE_XLINT_SWITCH
,S01_JavaCompiler
- Code:
- Exact Field Declaration Expression:
public final boolean USE_XLINT_SWITCH;
-
USE_XDIAGS_SWITCH
public final boolean USE_XDIAGS_SWITCH
The helps the Build-Logic decide whether to use the Java-Compiler Switch-Xdiags:verbose
. The default behavior is that the Java-Compiler will be invoked using that switch for all'.java'
Files that are being compiled.
The default behavior assigned in Configuration-ClassConfig
can easily be changed by reassigning the necessary value to fieldConfig.USE_XDIAGS_SWITCH
. When this field is reassiged a newboolean
, any invocation of theBuilder
's Java-Compiler Stage will check whether to use the-Xdiags:verbose
, based on this field's value.
On top ofConfig.USE_XDIAGS_SWITCH
, a user has the option of passing the Command-Line Wwitch-TXL
when invoking the Java-Compiler Build-Stage which, in effect, toggles whatever value was set by the originalConfig.USE_XDIAGS_SWITCH
setting. (This may be done when invoking'Builder'
from the CLI).
This may be more clearly seen in the code used to assign this field's value:
this.USE_XDIAGS_SWITCH = this.cli.aor.OVERRIDE_TOGGLE_USE_XDIAGS_SWITCH ? (! config.USE_XDIAGS_SWITCH) : config.USE_XDIAGS_SWITCH;
- See Also:
Config.USE_XDIAGS_SWITCH
,AuxiliaryOptRecord.OVERRIDE_TOGGLE_USE_XDIAGS_SWITCH
,S01_JavaCompiler
- Code:
- Exact Field Declaration Expression:
public final boolean USE_XDIAGS_SWITCH;
-
NO_JAVADOC_FRAMES_SWITCH
public final boolean NO_JAVADOC_FRAMES_SWITCH
Requests that the--frames
switch, which by default is passed to the Stage 2 Build-ClassS02_JavaDoc
be omitted.
By default, this Configuration-Field is assignedFALSE
, which means that the--frames
switch, by default, s passed to thejavadoc
stage.
Make sure to remember that after the JDK 11 Release, the--frames
switch was fully deprecated and removed from the tool. In such cases, make sure to assignTRUE
to the fieldConfig.NO_JAVADOC_FRAMES_SWITCH
, or the Stage 2 Build-Class will throw an exception.
Assigning this Field:
As can seen in this class' constructor, the value of this constant field is set by directly copying the corresponding field from theConfig
class instance' fieldConfig.NO_JAVADOC_FRAMES_SWITCH
. This Class' (Builder's
) Constructor requires aConfig
instance as an input parameter.
Java Line of Code:
this.NO_JAVADOC_FRAMES_SWITCH = config.NO_JAVADOC_FRAMES_SWITCH;
- See Also:
Config.NO_JAVADOC_FRAMES_SWITCH
,S02_JavaDoc
- Code:
- Exact Field Declaration Expression:
public final boolean NO_JAVADOC_FRAMES_SWITCH;
-
packageList
public final ReadOnlyList<BuildPackage> packageList
This Configuration is largely copied, directly, from the User-ProvidedConfig
class instance received. This Configuration-Field simply contains the list of packages that comprise the Java Project being built, compiled, documented & sychronized.
ClassConfig
-FieldConfig.packageList
contains a User-Provided list of packages, as instances ofBuildPackage
.
There isn't any validation done on the input array, other than that it must be non-null, and contain at least Java Package.
Quick Build Note:
The option to eliminate certain packages when doing a build is provided by classBuildPackage
. TheBuildPackage
Static-FlagBuildPackage.QUICKER_BUILD_SKIP
lets a user convey that, during development time, the compilation and documentation stages can skip certain packages altogether.
Note that if classCLI
has specified itsCLI.QUICKER_BUILD
field, then and only then, are packages designed asBuildPackage.skipIfQuickerBuild
actually removed.
Under Development Note:
The option to eliminate certain packages because they are still under development is an option also provided by the classBuildPackage
(via theEARLY_DEVELOPMENT
flag, and by theearlyDevelopment
field), and by the classCLI
(via theINCLUDE_EARLY_DEV_PACKAGES_SWITCH
field).
Assigning this Field:
This field's reference/value is assigned in this class constructor as in the code included below. The value is generated by the class / method:packagesInThisBuild
.
// This eliminates any packages that are irrelevant, as per the specifications // by the User at the Command-Line Interface 'argv' parameter. // // The included packages are in: "Ret2.a" // The eliminated packages are in: "Ret2.b" Ret2<ReadOnlyList<BuildPackage>, ReadOnlyList<BuildPackage>> ret2 = Packages.packagesInThisBuild(this.cli, config.packageList); // This is used in S01_JavaCompiler, S02_JavaDoc and S04_TarJar this.packageList = ret2.a;
- See Also:
Packages.packagesInThisBuild(CLI, BuildPackage[])
,Config.packageList
,CLI.QUICKER_BUILD
,BuildPackage.QUICKER_BUILD_SKIP
,BuildPackage.skipIfQuickerBuild
- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<BuildPackage> packageList;
-
jarIncludes
public final ReadOnlyList<Torello.Java.Build.JarInclude.Descriptor> jarIncludes
Additional & Miscellaneous Files that must be incorporated into the Project's'.jar'
File.
This Configuration-Field's value is computed by using package-private initializer code, as follows:
this.jarIncludes = (config.jarIncludes != null) ? config.jarIncludes.getAllDesriptors() : null;
- See Also:
Config.jarIncludes
,S04_TarJar
- Code:
- Exact Field Declaration Expression:
public final ReadOnlyList<JarInclude.Descriptor> jarIncludes;
-
cli
-
cloudSync
public final CloudSync cloudSync
Multiple Cloud-Synchronization Options may be presented within the User-Provided classConfig
instance. This instance is to be populated, at configuration time, by simply invoking that class'Config.addCloudSync(CloudSync)
method.
Once aConfig
instance is creaed, it is likely next to be used to parse "The User's User" Command-Line Terminal-Shell Menu-Input. Specificaly, the logic that processes the CLI Switches executes, and it is at that point that one of the (possibly multiple) Cloud Storage-Buckets or Storage-Systems are selected.
This field should contain a reference to theCloudSync
instance that was chosen at the Command-Line.
-
-