001package Torello.Java.Build; 002 003import Torello.JavaDoc.Upgrade; 004 005import Torello.Java.Verbosity; 006import Torello.Java.StrCmpr; 007import Torello.Java.EmptyListException; 008import Torello.Java.WritableDirectoryException; 009 010import Torello.Java.ReadOnly.ROArrayListBuilder; 011 012import Torello.HTML.Tools.Images.IF; 013 014import static Torello.Java.C.BYELLOW; 015import static Torello.Java.C.BCYAN; 016import static Torello.Java.C.RESET; 017 018import java.io.File; 019import java.io.FileNotFoundException; 020import java.io.IOException; 021import java.util.Objects; 022import java.util.regex.Pattern; 023 024import java.util.function.Consumer; 025import java.util.function.Predicate; 026 027/** 028 * This class provides a list of fields, all of which may be modified and configured, for providing 029 * any needed settings to class {@link BuilderRecord}. 030 * 031 * <BR /><BR />Use the {@code public} constructor offered by this class, and then set and change 032 * the values of any of the Configuration-Fields. Once this class Configuration-Fields have been 033 * appropriately set to contain your project's data, pass the instance to the {@link BuilderRecord} 034 * class' only constructor (along with an argv {@code String[]}-Array). 035 * 036 * <BR /><BR />This will inform the {@code BuilderRecord}-Constructor of all of your nedded 037 * settings, and once built, will make running your project's build script very easy. 038 */ 039public final class Config 040{ 041 // ******************************************************************************************** 042 // ******************************************************************************************** 043 // Validator Constants 044 // ******************************************************************************************** 045 // ******************************************************************************************** 046 047 048 /** 049 * Project-Name validation {@code String}. The value passed to configuration field/parameter 050 * must match this regular expression. This is used in this class {@link #validate()} method. 051 * 052 * @see #PROJECT_NAME 053 * @see BuilderRecord#PROJECT_NAME 054 * @see #validate() 055 */ 056 public static final Predicate<String> projectNameValidator = 057 Pattern.compile("^\\w[\\w\\d]*$").asPredicate(); 058 059 060 // ******************************************************************************************** 061 // ******************************************************************************************** 062 // Configuration Instance Fields 063 // ******************************************************************************************** 064 // ******************************************************************************************** 065 066 067 /** 068 * To-Do, Explain This 069 * @see BuilderRecord#HOME_DIR 070 */ 071 public String HOME_DIR = null; 072 073 /** 074 * The File-System Directory-Location where Java-Doc Output is sent for storage. Also the 075 * directory that the Upgrader searches to retrieve and parse JavaDoc Files. 076 * 077 * @see BuilderRecord#LOCAL_JAVADOC_DIR 078 */ 079 public String LOCAL_JAVADOC_DIR = "javadoc" + java.io.File.separator; 080 081 /** 082 * A simple name for this Project. Name must pass the {@link #projectNameValidator} 083 * Regular-Expression. 084 * 085 * @see BuilderRecord#PROJECT_NAME 086 * @see #projectNameValidator 087 */ 088 public String PROJECT_NAME = null; 089 090 /** 091 * The Major Version Number of the Current Build. This class {@link #validate()} method checks 092 * to ensure that this field contains a positive integer / byte value. 093 * 094 * @see BuilderRecord#VERSION_MAJOR_NUMBER 095 */ 096 public byte VERSION_MAJOR_NUMBER = 1; 097 098 /** 099 * The Minor Version Number of the Current Build. This class {@link #validate()} method checks 100 * to ensure that this field contains a positive integer / byte value. 101 * 102 * @see BuilderRecord#VERSION_MINOR_NUMBER 103 */ 104 public byte VERSION_MINOR_NUMBER = 0; 105 106 /** 107 * The full or partial Path-Name of the {@code 'javac'} binary to use for compiling this 108 * project. This parameter / field may not be null, or a {@code NullPointerException} will 109 * throw. 110 * 111 * <BR /><BR /><B CLASS=JDDescLabel>Default Setting:</B> 112 * 113 * <BR />The default setting for this Configuration-Field is just the command name, which 114 * is to presume that the {@code PATH} environment-variable has been set to facilitate finding 115 * {@code 'javac'} 116 * 117 * @see BuilderRecord#JAVAC_BIN 118 */ 119 public String JAVAC_BIN = "javac"; 120 121 /** 122 * The full or partial Path-Name of the {@code 'javac'} binary to use for compiling this 123 * project. This parameter / field may not be null, or a {@code NullPointerException} will 124 * throw. 125 * 126 * <BR /><BR /><B CLASS=JDDescLabel>Default Setting:</B> 127 * 128 * <BR />The default setting for this Configuration-Field is just the command name, which 129 * is to presume that the {@code PATH} environment-variable has been set to facilitate finding 130 * {@code 'javadoc'}. 131 * 132 * @see BuilderRecord#JAVADOC_BIN 133 */ 134 public String JAVADOC_BIN = "javadoc"; 135 136 /** 137 * The number to provide to the {@code --release} switch to {@code javac}. This number may be 138 * set to any negative value, and it will prevent the {@code BuilderRecord} from using this 139 * switch at all. 140 * 141 * @see BuilderRecord#JAVA_RELEASE_NUM_SWITCH 142 */ 143 public byte JAVA_RELEASE_NUM_SWITCH = -1; 144 145 /** 146 * Currently unused, but originally used to indicate the {@code javadoc} version being used 147 * @see BuilderRecord#JAVADOC_VER 148 */ 149 public byte JAVADOC_VER = 11; 150 151 /** 152 * If the <B>Stage 3</B> {@link Upgrade}-Process utilizes a favicon on its Web-Pages, then this 153 * field may be assigned to the location on disk where that favicon is located. 154 * 155 * <BR /><BR />When this field contains a non-null Image-File, that image will be copied (after 156 * upgrade has completed) directly to the {@code 'javadoc'} output directory. When this field 157 * is left null, it will be ignored and no favicon image is copied. 158 * 159 * @see BuilderRecord#FAVICON 160 */ 161 public String FAVICON = null; 162 163 /** 164 * Source-Directory to be used as root directory for archiving 165 * @see BuilderRecord#TAR_SOURCE_DIR 166 */ 167 public String TAR_SOURCE_DIR = null; 168 169 /** 170 * This optional configuration field is optional, and may be used to move / relocate the 171 * {@code '.jar'} File after it's built by this Build-Processor. If there is a diretory or 172 * location on the File-System into which the {@code '.jar'} should be moved, then provide that 173 * directory's name here. 174 * 175 * <BR /><BR />When this field is left null, it will be silently ignored; furthermore, the 176 * {@code '.jar'} File which the Build-Processor creates will be left in the Current Working 177 * Directory. 178 */ 179 public String JAR_FILE_MOVE_DIR = null; 180 181 /** 182 * The directory location where log information will be saved. This configuration field may 183 * not be null, or a {@code NullPointerException} will throw. 184 */ 185 public String LOG_DIR = null; 186 187 /** 188 * The <B>Stage 3</B> {@link Upgrade} instance to invoke. This parameter-field configuration 189 * may not be null, or a {@code NullPointerException} will throw. 190 */ 191 public Upgrade upgrader = null; 192 193 /** 194 * The script invoked <B STYLE='color: red'><I>before</I></B> the <B>Stage 3</B> call to 195 * {@link Upgrade}. This configuration may be assigned null, and in such cases, no script will 196 * be invoked before the upgrader runs. 197 * 198 * @see BuilderRecord#preUpgraderScript 199 */ 200 public UpgradeProcessor preUpgraderScript = null; 201 202 /** 203 * The script invoked <B STYLE='color: red'><I>after</I></B> the <B>Stage 3</B> call to 204 * {@link Upgrade}. This configuration may be assigned null, and in such cases, no script will 205 * be invoked before the upgrader runs. 206 * 207 * @see BuilderRecord#postUpgraderScript 208 */ 209 public UpgradeProcessor postUpgraderScript = null; 210 211 /** 212 * For Stage 1, the Java-Compiler Stage, this Configuration-Field may be assigned any 213 * switch-{@code String's}, and they will be passed to the {@code javac} invocation. 214 * 215 * <BR /><BR />This field's value may be left null, or assigned a zero-length 216 * {@code String[]}-Array and, in both cases, it shall be ignored. 217 * 218 * @see BuilderRecord#extraSwitchesJAVAC 219 */ 220 public String[] extraSwitchesJAVAC = null; 221 222 /** 223 * For Stage 2, the {@code javadoc} Stage, this Configuration-Field may be assigned any 224 * switch-{@code String's}, and they will be passed to the {@code javadoc} invocation. 225 * 226 * <BR /><BR />This field's value may be left or null, or assigned a zero-length 227 * {@code String[]}-Array, and, in both cases, it shall be ignored. 228 * 229 * @see BuilderRecord#extraSwitchesJAVADOC 230 */ 231 public String[] extraSwitchesJAVADOC = null; 232 233 /** 234 * The list of Java Packages to compile. This list may be neither empty nor null, or an 235 * exception will throw. 236 * 237 * @see BuilderRecord#packageList 238 */ 239 public BuildPackage[] packageList = null; 240 241 /** 242 * The Root Class-File Directories to use with {@code 'javac'}. This is used to generate the 243 * value passed to the {@code -cp} switch passed when <B>Stage 1</B> invokes the Java-Compiler. 244 * This parameter / field may be empty or null, and if it is, it will be ignored. 245 */ 246 public String[] CLASS_PATH = null; 247 248 /** 249 * This allows for specifying a list of files to manually add into the {@code '.jar'} that is 250 * built by this package. 251 * 252 * <BR /><BR /><B CLASS=JDDescLabel>Constructor Call:</B> 253 * 254 * <BR />Because it isn't necessary to include any "Extra Files" into the {@code '.jar'}, there 255 * is some likelihood that this Configuration-Field wouldn't ever be needed / used. Make sure 256 * to call the {@link JarInclude} constructor, first, to build an instance of this Config-Field 257 * before attempting to use it. Notice that it is initially initialized to null! 258 * 259 * <BR /><BR /><B CLASS=JDDescLabel>Common Usess:</B> 260 * 261 * <BR />Java-HTML has quite a few Data-Files that are inserted into the Jar-File, manually, 262 * using this class. There may also be the need to insert {@code META-INF/} directory files 263 * that name things like Annotation-Processor locations, taglets, or other Java Services. 264 * 265 * @see BuilderRecord#jarIncludes 266 */ 267 public JarInclude jarIncludes = null; 268 269 /** 270 * Requests that when {@code 'javac'} is invoked, the switch {@code -Xlint:all,-processing} is 271 * included in the command-line invocation. 272 * 273 * @see BuilderRecord#USE_XLINT_SWITCH 274 */ 275 public boolean USE_XLINT_SWITCH = true; 276 277 /** 278 * Requests that when {@code 'javac'} is invoked, the switch {@code -Xdiags:verbose} is 279 * included in the command-line invocation. 280 * 281 * @see BuilderRecord#USE_XDIAGS_SWITCH 282 */ 283 public boolean USE_XDIAGS_SWITCH = true; 284 285 /** 286 * JavaDoc Frames were a true majesty that should never have been eliminated. If you would 287 * prefer to remove them, or you are using JDK 21+ which no longer accepts the {@code --frames} 288 * switch, then set this Configuration-Field to {@code FALSE}. 289 * 290 * @see BuilderRecord#NO_JAVADOC_FRAMES_SWITCH 291 */ 292 public boolean NO_JAVADOC_FRAMES_SWITCH = false; 293 294 295 // ******************************************************************************************** 296 // ******************************************************************************************** 297 // Cloud Synchronization 298 // ******************************************************************************************** 299 // ******************************************************************************************** 300 301 302 @SuppressWarnings("rawtypes") 303 final ROArrayListBuilder<CloudSync> cloudSyncListBuilder = new ROArrayListBuilder<>(); 304 305 public void addCloudSync(CloudSync cloudSync) 306 { 307 Objects.requireNonNull(cloudSync, "You have passed null to parameter 'cloduSync'"); 308 this.cloudSyncListBuilder.add(cloudSync); 309 } 310 311 312 // ******************************************************************************************** 313 // ******************************************************************************************** 314 // Constructor 315 // ******************************************************************************************** 316 // ******************************************************************************************** 317 318 319 /** 320 * Creates an instance of this class, with all default values assigned to the parameter / 321 * fields. 322 * 323 * <BR /><BR />The intention is that an instance of this class will have its 324 * Configuration-Fields property assigned, according to the needs of the Project being built. 325 * Afterwards, the {@code 'Config'} instance may be passed to the Package-Private 326 * {@code 'BuilderRecord'}-Constructor using this class' {@link #createBuilder(String[])} 327 * method. 328 * 329 * <BR /><BR />Performing a build is done using {@link RunBuild#run(BuilderRecord)}. 330 * 331 * @see #createBuilder(String[]) 332 * @see RunBuild#run(BuilderRecord) 333 */ 334 public Config() { } 335 336 337 // ******************************************************************************************** 338 // ******************************************************************************************** 339 // Methods: createBuilder & validate 340 // ******************************************************************************************** 341 // ******************************************************************************************** 342 343 344 /** 345 * Used by class {@link BuilderRecord} to validate all user-provided data on a best efforts 346 * basis. 347 * 348 * @throws NullPointerException If any of the configuration parameter/fields listed here have 349 * been assigned null 350 * 351 * <BR /><UL CLASS=JDUL> 352 * <LI>{@link #LOCAL_JAVADOC_DIR}</LI> 353 * <LI>{@link #PROJECT_NAME}</LI> 354 * <LI>{@link #JAVAC_BIN}</LI> 355 * <LI>{@link #JAVADOC_BIN}</LI> 356 * <LI>{@link #TAR_SOURCE_DIR}</LI> 357 * <LI>{@link #LOG_DIR}</LI> 358 * <LI>{@link #upgrader}</LI> 359 * <LI>{@link #packageList}</LI> 360 * </UL> 361 * 362 * <BR />This exception will also be thrown if these lists contain any null-valued 363 * entries: 364 * <BR /><UL CLASS=JDUL> 365 * <LI>{@link #packageList}</LI> 366 * <LI>{@link #CLASS_PATH}</LI> 367 * </UL> 368 * 369 * @throws IllegalArgumentException If any of these configuration fields were assigned a 370 * negative number: 371 * <BR /><UL CLASS=JDUL> 372 * <LI>{@link VERSION_MAJOR_NUMBER}</LI> 373 * <LI>{@link VERSION_MINOR_NUMBER}</LI> 374 * <LI>{@link JAVADOC_VER}</LI> 375 * </UL> 376 * 377 * <BR />This exception will also be thrown if: 378 * <BR /><UL CLASS=JDUL> 379 * <LI> {@link #PROJECT_NAME} does not pass the {@link #projectNameValidator} test.</LI> 380 * </UL> 381 * 382 * @throws FileNotFoundException This exception will throw if either of these fields are not 383 * assigned a valid File-System Directory-Name: 384 * <BR /><UL CLASS=JDUL> 385 * <LI> {@link #FAVICON}</LI> 386 * <LI> {@link #TAR_SOURCE_DIR}</LI> 387 * </UL> 388 * 389 * @throws UnrecognizedImageExtException If the {@link #FAVICON} Image-Format cannot be 390 * properly "guessed" by class {@link IF}. 391 * 392 * @throws EmptyListException If {@link #packageList} has been assigned an empty list. 393 * 394 * @throws WriteableDirectoryException If parameter {@link #JAR_FILE_MOVE_DIR} is assigned a 395 * non-null value, but the {@code String} assigned it does not point to a File-System 396 * directory, or that directory is not writeable. 397 * 398 * <BR /><BR />Also throws if {@link #LOG_DIR} is not a valid directory-name, that allows 399 * write-access. 400 */ 401 public final void validate() throws java.io.FileNotFoundException 402 { 403 Objects.requireNonNull(LOCAL_JAVADOC_DIR, M1 + "LOCAL_JAVADOC_DIR" + M2); 404 Objects.requireNonNull(PROJECT_NAME, M1 + "PROJECT_NAME" + M2); 405 Objects.requireNonNull(JAVAC_BIN, M1 + "JAVAC_BIN" + M2); 406 Objects.requireNonNull(JAVADOC_BIN, M1 + "JAVADOC_BIN" + M2); 407 Objects.requireNonNull(TAR_SOURCE_DIR, M1 + "TAR_SOURCE_DIR" + M2); 408 Objects.requireNonNull(LOG_DIR, M1 + "LOG_DIR" + M2); 409 Objects.requireNonNull(upgrader, M1 + "upgrader" + M2); 410 Objects.requireNonNull(packageList, M1 + "packageList" + M2); 411 412 if (! projectNameValidator.test(PROJECT_NAME)) throw new IllegalArgumentException 413 (M1 + "PROJECT_NAME] was not passed a valid name."); 414 415 if (VERSION_MAJOR_NUMBER < 0) throw new IllegalArgumentException 416 (M1 + "VERSION_MAJOR_NUMBER" + M3 + VERSION_MAJOR_NUMBER); 417 418 if (VERSION_MINOR_NUMBER < 0) throw new IllegalArgumentException 419 (M1 + "VERSION_MINOR_NUMBER" + M3 + VERSION_MINOR_NUMBER); 420 421 if (JAVADOC_VER < 0) throw new IllegalArgumentException 422 (M1 + "JAVADOC_VER" + M3 + JAVADOC_VER); 423 424 if (FAVICON != null) 425 { 426 File f = new File(FAVICON); 427 428 if ((! f.exists()) || (! f.isFile())) throw new FileNotFoundException( 429 "Field 'FAVICON' [" + FAVICON + "] points to a file that was not found, or " + 430 "isn't a File" 431 ); 432 433 IF.guessOrThrow(FAVICON); 434 } 435 436 if (packageList.length == 0) throw new EmptyListException 437 (M1 + "packageList] was passed a list of size 0."); 438 439 for (BuildPackage bp : packageList) if (bp == null) throw new NullPointerException 440 (M1 + "packageList] contains a null value."); 441 442 for (String p : CLASS_PATH) if (p == null) throw new NullPointerException 443 (M1 + "CLASS_PATH] contains a null value."); 444 445 File f = new File(TAR_SOURCE_DIR); 446 if (! (f.exists() && f.isDirectory())) throw new FileNotFoundException 447 (M1 + "] was not passed a vaild File-System Directory-Name."); 448 449 if (JAR_FILE_MOVE_DIR != null) 450 { 451 WritableDirectoryException.check(JAR_FILE_MOVE_DIR); 452 453 if (! JAR_FILE_MOVE_DIR.endsWith(File.separator)) 454 JAR_FILE_MOVE_DIR = JAR_FILE_MOVE_DIR + File.separator; 455 } 456 457 WritableDirectoryException.check(LOG_DIR); 458 459 if (! LOG_DIR.endsWith(File.separator)) LOG_DIR = LOG_DIR + File.separator; 460 } 461 462 private static final String M1 = "The Parameter-Field Configuration ["; 463 private static final String M2 = "] was ultimately assigned null."; 464 private static final String M3 = "] was passed a negative number: "; 465 466 final String classPathStr(boolean INCLUDE_JAR_IN_CP, String JAR_FILE_NAME) 467 { 468 if (CLASS_PATH == null) return INCLUDE_JAR_IN_CP ? JAR_FILE_NAME : null; 469 470 final String sep = StrCmpr.containsIgnoreCase(System.getProperty("os.name"), "win") 471 ? ";" 472 : ":"; 473 474 final StringBuilder sb = new StringBuilder(); 475 476 for (int i=0; i < CLASS_PATH.length; i++) sb.append(((i==0) ? "" : sep) + CLASS_PATH[i]); 477 478 if (INCLUDE_JAR_IN_CP) sb.append(sep + JAR_FILE_NAME); 479 480 return sb.toString(); 481 } 482 483 484 /** 485 * Processes Command-Line Inputs, and creates an instance of {@link BuilderRecord}. 486 * You may initiate a build using that class by calling the {@link RunBuild#run(BuilderRecord)} 487 * method. 488 * 489 * @param argv The Command-Line Inputs 490 * 491 * @return An instance of {@link BuilderRecord}. You may invoke the method 492 * {@link RunBuild#run(BuilderRecord)} to initiate a build. 493 * 494 * @throws FileNotFoundException Throw by the class {@link Config} 495 * {@link Config#validate() validate} method if there are problems with the user's provided 496 * configurations. 497 * 498 * @throws IOException Thrown if there are IO Problems while reading any of the files in the 499 * Class-Path, or other configurations. 500 */ 501 public BuilderRecord createBuilder(String[] argv) throws FileNotFoundException, IOException 502 { return new BuilderRecord(this, argv); } 503 504 505 // ******************************************************************************************** 506 // ******************************************************************************************** 507 // java.lang.Object 508 // ******************************************************************************************** 509 // ******************************************************************************************** 510 511 512 public String toString() 513 { 514 final Config DEF = new Config(); 515 516 // public String HOME_DIR = null; 517 // public String LOCAL_JAVADOC_DIR = "javadoc" + java.io.File.separator; 518 // public String PROJECT_NAME = null; 519 // public byte VERSION_MAJOR_NUMBER = 1; 520 // public byte VERSION_MINOR_NUMBER = 0; 521 // public String JAVAC_BIN = "javac"; 522 // public String JAVADOC_BIN = "javadoc"; 523 // public byte JAVA_RELEASE_NUM_SWITCH = -1; 524 // public byte JAVADOC_VER = 11; 525 // public String FAVICON = null; 526 // public String TAR_SOURCE_DIR = null; 527 // public String JAR_FILE_MOVE_DIR = null; 528 // public String LOG_DIR = null; 529 // public Upgrade upgrader = null; 530 // public UpgradeProcessor preUpgraderScript = null; 531 // public UpgradeProcessor postUpgraderScript = null; 532 // public String[] extraSwitchesJAVAC = null; 533 // public String[] extraSwitchesJAVADOC = null; 534 // public BuildPackage[] packageList = null; 535 // public String[] CLASS_PATH = null; 536 // public JarInclude jarIncludes = null; 537 // public boolean USE_XLINT_SWITCH = true; 538 // public boolean USE_XDIAGS_SWITCH = true; 539 // public boolean NO_JAVADOC_FRAMES_SWITCH = false; 540 541 return 542 543 // public String HOME_DIR 544 BCYAN + "HOME_DIR:\n\t" + RESET + 545 BYELLOW + "Value: " + RESET + " **** " + /*this.HOME_DIR*/ "\n\t" + 546 BYELLOW + "Default: " + RESET + DEF.HOME_DIR + "\n\n" + 547 548 // public String LOCAL_JAVADOC_DIR 549 BCYAN + "LOCAL_JAVADOC_DIR:\n\t" + RESET + 550 BYELLOW + "Value: " + RESET + this.LOCAL_JAVADOC_DIR + "\n\t" + 551 BYELLOW + "Default: " + RESET + DEF.LOCAL_JAVADOC_DIR + "\n\n" + 552 553 // public String PROJECT_NAME 554 BCYAN + "PROJECT_NAME:\n\t" + RESET + 555 BYELLOW + "Value: " + RESET + this.PROJECT_NAME + "\n\t" + 556 BYELLOW + "Default: " + RESET + DEF.PROJECT_NAME + "\n\n" + 557 558 // public byte VERSION_MAJOR_NUMBER 559 BCYAN + "VERSION_MAJOR_NUMBER:\n\t" + RESET + 560 BYELLOW + "Value: " + RESET + this.VERSION_MAJOR_NUMBER + "\n\t" + 561 BYELLOW + "Default: " + RESET + DEF.VERSION_MAJOR_NUMBER + "\n\n" + 562 563 // public byte VERSION_MINOR_NUMBER 564 BCYAN + "VERSION_MINOR_NUMBER:\n\t" + RESET + 565 BYELLOW + "Value: " + RESET + this.VERSION_MINOR_NUMBER + "\n\t" + 566 BYELLOW + "Default: " + RESET + DEF.VERSION_MINOR_NUMBER + "\n\n" + 567 568 // public String JAVAC_BIN 569 BCYAN + "JAVAC_BIN:\n\t" + RESET + 570 BYELLOW + "Value: " + RESET + this.JAVAC_BIN + "\n\t" + 571 BYELLOW + "Default: " + RESET + DEF.JAVAC_BIN + "\n\n" + 572 573 // public String JAVADOC_BIN 574 BCYAN + "JAVADOC_BIN:\n\t" + RESET + 575 BYELLOW + "Value: " + RESET + this.JAVADOC_BIN + "\n\t" + 576 BYELLOW + "Default: " + RESET + DEF.JAVADOC_BIN + "\n\n" + 577 578 // public byte JAVA_RELEASE_NUM_SWITCH 579 BCYAN + "JAVA_RELEASE_NUM_SWITCH:\n\t" + RESET + 580 BYELLOW + "Value: " + RESET + this.JAVA_RELEASE_NUM_SWITCH + "\n\t" + 581 BYELLOW + "Default: " + RESET + DEF.JAVA_RELEASE_NUM_SWITCH + "\n\n" + 582 583 // public byte JAVADOC_VER 584 BCYAN + "JAVADOC_VER:\n\t" + RESET + 585 BYELLOW + "Value: " + RESET + this.JAVADOC_VER + "\n\t" + 586 BYELLOW + "Default: " + RESET + DEF.JAVADOC_VER + "\n\n" + 587 588 // public String FAVICON 589 BCYAN + "FAVICON:\n\t" + RESET + 590 BYELLOW + "Value: " + RESET + this.FAVICON + "\n\t" + 591 BYELLOW + "Default: " + RESET + DEF.FAVICON + "\n\n" + 592 593 // public String TAR_SOURCE_DIR 594 BCYAN + "TAR_SOURCE_DIR:\n\t" + RESET + 595 BYELLOW + "Value: " + RESET + this.TAR_SOURCE_DIR + "\n\t" + 596 BYELLOW + "Default: " + RESET + DEF.TAR_SOURCE_DIR + "\n\n" + 597 598 // public String JAR_FILE_MOVE_DIR 599 BCYAN + "JAR_FILE_MOVE_DIR:\n\t" + RESET + 600 BYELLOW + "Value: " + RESET + this.JAR_FILE_MOVE_DIR + "\n\t" + 601 BYELLOW + "Default: " + RESET + DEF.JAR_FILE_MOVE_DIR + "\n\n" + 602 603 // public String LOG_DIR 604 BCYAN + "LOG_DIR:\n\t" + RESET + 605 BYELLOW + "Value: " + RESET + this.LOG_DIR + "\n\t" + 606 BYELLOW + "Default: " + RESET + DEF.LOG_DIR + "\n\n" + 607 608 // public Upgrader upgrader 609 BCYAN + "upgrader:\n\t" + RESET + 610 BYELLOW + "Value: " + RESET + this.upgrader + "\n\t" + 611 BYELLOW + "Default: " + RESET + DEF.upgrader + "\n\n" + 612 613 // public UpgradeProcessor preUpgraderScript 614 BCYAN + "preUpgraderScript:\n\t" + RESET + 615 BYELLOW + "Value: " + RESET + this.preUpgraderScript + "\n\t" + 616 BYELLOW + "Default: " + RESET + DEF.preUpgraderScript + "\n\n" + 617 618 // public UpgradeProcessor postUpgraderScript 619 BCYAN + "postUpgraderScript:\n\t" + RESET + 620 BYELLOW + "Value: " + RESET + this.postUpgraderScript + "\n\t" + 621 BYELLOW + "Default: " + RESET + DEF.postUpgraderScript + "\n\n" + 622 623 // public String[] extraSwitchesJAVAC 624 BCYAN + "extraSwitchesJAVAC:\n\t" + RESET + 625 BYELLOW + "Value: " + RESET + SARR(this.extraSwitchesJAVAC) + "\n\t" + 626 BYELLOW + "Default: " + RESET + SARR(DEF.extraSwitchesJAVAC) + "\n\n" + 627 628 // public String[] extraSwitchesJAVADOC 629 BCYAN + "extraSwitchesJAVADOC:\n\t" + RESET + 630 BYELLOW + "Value: " + RESET + SARR(this.extraSwitchesJAVADOC) + "\n\t" + 631 BYELLOW + "Default: " + RESET + SARR(DEF.extraSwitchesJAVADOC) + "\n\n" + 632 633 // public BuildPackage[] packageList 634 BCYAN + "packageList:\n\t" + RESET + 635 BYELLOW + "Value: " + RESET + PLARR(this.packageList) + "\n\t" + 636 BYELLOW + "Default: " + RESET + PLARR(DEF.packageList) + "\n\n" + 637 638 // public String[] CLASS_PATH 639 BCYAN + "CLASS_PATH:\n\t" + RESET + 640 BYELLOW + "Value: " + RESET + SARR(this.CLASS_PATH) + "\n\t" + 641 BYELLOW + "Default: " + RESET + SARR(DEF.CLASS_PATH) + "\n\n" + 642 643 644 // public JarInclude jarIncludes 645 BCYAN + "jarIncludes:\n\t" + RESET + 646 BYELLOW + "Value: " + RESET + this.jarIncludes + "\n\t" + 647 BYELLOW + "Default: " + RESET + DEF.jarIncludes + "\n\n" + 648 649 // public boolean USE_XLINT_SWITCH 650 BCYAN + "USE_XLINT_SWITCH:\n\t" + RESET + 651 BYELLOW + "Value: " + RESET + this.USE_XLINT_SWITCH + "\n\t" + 652 BYELLOW + "Default: " + RESET + DEF.USE_XLINT_SWITCH + "\n\n" + 653 654 // public boolean USE_XDIAGS_SWITCH 655 BCYAN + "USE_XDIAGS_SWITCH:\n\t" + RESET + 656 BYELLOW + "Value: " + RESET + this.USE_XDIAGS_SWITCH + "\n\t" + 657 BYELLOW + "Default: " + RESET + DEF.USE_XDIAGS_SWITCH + "\n\n" + 658 659 // public boolean NO_JAVADOC_FRAMES_SWITCH 660 BCYAN + "NO_JAVADOC_FRAMES_SWITCH:\n\t" + RESET + 661 BYELLOW + "Value: " + RESET + this.NO_JAVADOC_FRAMES_SWITCH + "\n\t" + 662 BYELLOW + "Default: " + RESET + DEF.NO_JAVADOC_FRAMES_SWITCH + "\n\n"; 663 } 664 665 private static String SARR(String[] sArr) 666 { 667 if (sArr == null) return "[null]"; 668 StringBuilder sb = new StringBuilder(); 669 for (String s : sArr) sb.append("\n\t\t" + s); 670 return sb.toString(); 671 } 672 673 private static String PLARR(BuildPackage[] packageList) 674 { 675 if (packageList == null) return "[null]"; 676 StringBuilder sb = new StringBuilder(); 677 for (BuildPackage bp : packageList) sb.append("\n\t\t" + bp.fullName); 678 return sb.toString(); 679 } 680}