Path: blob/master/test/langtools/jdk/javadoc/tool/sampleapi/README.txt
40974 views
1SampleAPI Generator for javadoc231. General description45The primary goal is to provide one or more data sets to be used as input6to the javadoc tool, such that it can be used to generate representative samples7of all the different content on all the different types of pages that can be8generated by javadoc.910The tool is implemented as generator based on xml descriptions of data sets.11The xml description of data set provides top level entities (class, interface,12enum, annotation) with all possible content. Desired output parameters (fields,13methods, inner/nested classes) are also described in xml as lists of modifiers,14types and annotations. The generator "multiply" the entities from the lists15providing the set of all possible combinations.1617After the api generation the tool connects the javadoc style comments to18the generated entities with full possible sets of supported tags.19202. Tool structure2122Sources:23test/tools/javadoc/sampleapi/lib - generator sources24test/tools/javadoc/sampleapi/res/xml - sample data sets in xml25test/tools/javadoc/sampleapi/res/txt - sample texts for doc comments26273. Public API28293.1 Command line runner3031* test/tools/javadoc/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java3233class sampleapi.SampleApiDefaultRunner3435Options: [-?|-h|--help] [-o:<dir>|--outdir:<dir>]36-?|-h|--help - print help37-o:<dir>|--outdir:<dir> - set <dir> to generate output38393.2 Programmatic access4041* test/tools/javadoc/sampleapi/lib/sampleapi/SampleApi.java4243class sampleapi.SampleApi4445public void generate(File dir)46public void generate(Path dir)47public void generate(String dir)48493.3 How to run other xml data set description5051Put data set xml description into res/xml directory5253* test/tools/javadoc/sampleapi/lib/sampleapi/generator/PackageGenerator.java5455class sampleapi.generator.PackageGenerator5657public void processDataSet(String dsName)58public void generate(File outDir)596061