1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package Torello.BuildJAR;

import Torello.Java.Build.BuildPackage;
import Torello.Java.ReadOnly.ReadOnlyList;

// These are the flag constants
import static Torello.Java.Build.BuildPackage.*;

class MyPackages
{
    // I hate typing this over and over
    private static final String FS = java.io.File.separator;

    // The External Library Imports are put into this directory
    private static final String EXTERNAL_DIR = "Torello" + FS + "etc" + FS + "External" + FS;

    /*
    ===============================================================================================
    ===============================================================================================
    BuildPackage Constructor Parameters:
        String fullName
        String classPathLocation
        String packageNickName
        byte flags
        ReadOnlyList<String> helperPackages

    BuildPackage Configuration-FLAGS:
        DO_NOT_RECOMPILE, DO_NOT_DOCUMENT, HAS_SUB_PACKAGES, QUICKER_BUILD_SKIP,
        DO_NOT_JAR, EARLY_DEVELOPMENT
    ===============================================================================================
    ===============================================================================================
    */

    static final BuildPackage[] packagesArr =
    {
        // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
        // Simple Packages
        // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

        new BuildPackage("Torello.Browser",                 "", "Browser",      QUICKER_BUILD_SKIP),
        new BuildPackage("Torello.CSS",                     "", "CSS",          0),
        new BuildPackage("Torello.HTML",                    "", "HTML",         0, "helper"),
        new BuildPackage("Torello.HTML.NodeSearch",         "", "NS",           0),
        new BuildPackage("Torello.HTML.Tools.Images",       "", "Images",       0),
        new BuildPackage("Torello.HTML.Tools.NewsSite",     "", "News",         0),
        new BuildPackage("Torello.HTML.Tools.SyntaxHiLite", "", "SHL",          DO_NOT_DOCUMENT, "JDUExport"),
        new BuildPackage("Torello.Java",                    "", "Java",         0),
        new BuildPackage("Torello.Java.Additional",         "", "Additional",   0),
        new BuildPackage("Torello.Java.Build",              "", "Build",        0),
        new BuildPackage("Torello.Java.Function",           "", "Function",     0),
        new BuildPackage("Torello.Java.JSON",               "", "JSON",         0),
        new BuildPackage("Torello.Java.ReadOnly",           "", "RO",           0),
        new BuildPackage("Torello.JavaDoc",                 "", "JavaDoc",      0, "hidden"),
        new BuildPackage("Torello.Languages",               "", "Languages",    0),

        // NOTE: The "hidden" Helper-Package for JavaDoc currently has one, minor, Helper-Class.
        //       It involves something known as "Repeatable" Annotations, which apparently require
        //       another / a second Annotation to use as a "Container Annotation" that can capably
        //       "represent" multiple uses of the same annotation into a single container
        //       annotation.


        // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
        // Internal Packages.  Large Package Trees of Internally-Used-Only Source-Code
        // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
        // 
        // Note that as of July 2024, these cannot be documented, and their "mustDocument" boolean
        // is automaticaly set to false.  They are not passed to the JavaDoc Tool during Stage-2,
        // and (therefore) cannot be upgraded either.
        // 
        // The original DO_NOT_DOCUMENT is still available as a flag, but does not need to be 
        // applied to any package that "HAS_SUB_PACKAGES".  Note that the "HAS_SUB_PACKAGES" really
        // is very useful because it (unlike the "package-source/" construct), allows classes to 
        // be divided up into individual packages, meaning not everything has to be one giant
        // "Package-Private" primordial-soup.
        // 
        // "Package-Private" is great, but for very big applications like the upgrader, having
        // classes, which are still separated into different packages themselves, but are also 
        // internal adds another facet of organization to the code.
        //
        // One of the Reddit-Losers (it's one giant insult network AFAIK, almost a bad as
        // ToiletOverflow.com) did mention that using Java-Modules allows you to specify which
        // packages are NOT TO BE EXPORTED from a Java-Module.  The "HAS_SUB_PACKAGES" is
        // somewhat like that, but specifies that its packages are not exported to the
        // relevant Documentation-Pages.

        new BuildPackage
            ("Torello.BuildJAR", "", "BuildJAR", HAS_SUB_PACKAGES | DO_NOT_JAR),

        new BuildPackage
            ("Torello.HTML.NodeSearch.SearchLoops", "", "nsloops", HAS_SUB_PACKAGES),

        new BuildPackage
            ("Torello.JDUInternal", "", "JDU", HAS_SUB_PACKAGES),


        // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
        // External-Library Packages
        // *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***

        new BuildPackage
            ("Apache.CLI", EXTERNAL_DIR, "CLI", DO_NOT_RECOMPILE),

        new BuildPackage
            ("javax.json", EXTERNAL_DIR, "json", DO_NOT_RECOMPILE),

        new BuildPackage
            ("javax.json.stream", EXTERNAL_DIR, "JsonStream", DO_NOT_RECOMPILE),

        new BuildPackage(
            "org.glassfish.json", EXTERNAL_DIR, "glass", DO_NOT_RECOMPILE | DO_NOT_DOCUMENT,
            "api" // Helper-Package (undocumented by default)
        ),

        new BuildPackage
            ("NeoVisionaries.WebSockets", EXTERNAL_DIR, "WS", DO_NOT_RECOMPILE)
    };
}