langtools/test/tools/javadoc/sampleapi/README.txt
author hannesw
Tue, 22 Mar 2016 14:23:16 +0100
changeset 36690 06b714373aa4
parent 33919 e9fccc09cfc6
permissions -rw-r--r--
8151810: for-in iteration does not provide per-iteration scope Reviewed-by: attila, lagergren
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33919
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     1
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     2
            SampleAPI Generator for javadoc
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     3
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     4
1. General description
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     5
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     6
    The primary goal is to provide one or more data sets to be used as input
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     7
to the javadoc tool, such that it can be used to generate representative samples
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     8
of all the different content on all the different types of pages that can be
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
     9
generated by javadoc.
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    10
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    11
    The tool is implemented as generator based on xml descriptions of data sets.
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    12
The xml description of data set provides top level entities (class, interface,
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    13
enum, annotation) with all possible content. Desired output parameters (fields,
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    14
methods, inner/nested classes) are also described in xml as lists of modifiers,
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    15
types and annotations. The generator "multiply" the entities from the lists
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    16
providing the set of all possible combinations.
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    17
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    18
    After the api generation the tool connects the javadoc style comments to
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    19
the generated entities with full possible sets of supported tags.
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    20
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    21
2. Tool structure
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    22
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    23
    Sources:
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    24
        test/tools/javadoc/sampleapi/lib - generator sources
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    25
        test/tools/javadoc/sampleapi/res/xml - sample data sets in xml
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    26
        test/tools/javadoc/sampleapi/res/txt - sample texts for doc comments
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    27
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    28
3. Public API
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    29
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    30
3.1 Command line runner
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    31
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    32
  * test/tools/javadoc/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    33
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    34
    class sampleapi.SampleApiDefaultRunner
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    35
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    36
  Options: [-?|-h|--help] [-o:<dir>|--outdir:<dir>]
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    37
    -?|-h|--help             - print help
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    38
    -o:<dir>|--outdir:<dir>  - set <dir> to generate output
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    39
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    40
3.2 Programmatic access
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    41
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    42
  * test/tools/javadoc/sampleapi/lib/sampleapi/SampleApi.java
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    43
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    44
    class sampleapi.SampleApi
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    45
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    46
    public void generate(File dir)
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    47
    public void generate(Path dir)
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    48
    public void generate(String dir)
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    49
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    50
3.3 How to run other xml data set description
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    51
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    52
  Put data set xml description into res/xml directory
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    53
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    54
  * test/tools/javadoc/sampleapi/lib/sampleapi/generator/PackageGenerator.java
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    55
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    56
    class sampleapi.generator.PackageGenerator
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    57
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    58
    public void processDataSet(String dsName)
e9fccc09cfc6 8130880: Create sampleapi regression test
ksrini
parents:
diff changeset
    59
    public void generate(File outDir)