Package org.apache.sis.internal.doclet
Class Doclet
java.lang.Object
jdk.javadoc.doclet.StandardDoclet
org.apache.sis.internal.doclet.Doclet
- All Implemented Interfaces:
jdk.javadoc.doclet.Doclet
public final class Doclet
extends jdk.javadoc.doclet.StandardDoclet
A doclet which delegates the work to the standard doclet, then performs additional actions.
The post-javadoc actions are:
- Copy additional resources.
- Since:
- 0.5
- Version:
- 1.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface jdk.javadoc.doclet.Doclet
jdk.javadoc.doclet.Doclet.Option
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static void
copyResources
(Path inputDirectory, Path outputDirectory) Creates links to Javadoc resources in the top-level directory (not from "doc-files
" subdirectories).private void
error
(IOException e) Reports an I/O errors.getName()
Returns a name identifying this doclet.Set
<jdk.javadoc.doclet.Doclet.Option> Returns the options supported by the standard doclet.private static Path
Returns thesrc/main/javadoc/
directory relative to the root of the Maven project.boolean
run
(jdk.javadoc.doclet.DocletEnvironment environment) Invoked by Javadoc for starting the doclet.Methods inherited from class jdk.javadoc.doclet.StandardDoclet
getLocale, getReporter, getSupportedSourceVersion, init
-
Field Details
-
STYLESHEET
The name of the SIS-specific stylesheet file.- See Also:
-
outputDirectory
The directory where HTML pages will be written.
-
-
Constructor Details
-
Doclet
public Doclet()Invoked by the Javadoc tools for instantiating the custom doclet.
-
-
Method Details
-
getSupportedOptions
Returns the options supported by the standard doclet.- Specified by:
getSupportedOptions
in interfacejdk.javadoc.doclet.Doclet
- Overrides:
getSupportedOptions
in classjdk.javadoc.doclet.StandardDoclet
- Returns:
- all the supported options.
-
getName
Returns a name identifying this doclet.- Specified by:
getName
in interfacejdk.javadoc.doclet.Doclet
- Overrides:
getName
in classjdk.javadoc.doclet.StandardDoclet
- Returns:
- "ApacheSIS".
-
run
public boolean run(jdk.javadoc.doclet.DocletEnvironment environment) Invoked by Javadoc for starting the doclet.- Specified by:
run
in interfacejdk.javadoc.doclet.Doclet
- Overrides:
run
in classjdk.javadoc.doclet.StandardDoclet
- Parameters:
environment
- the Javadoc environment.- Returns:
true
on success, orfalse
on failure.
-
resources
Returns thesrc/main/javadoc/
directory relative to the root of the Maven project. This method scans parents of the given directory until we find the root of the Maven project.- Throws:
FileNotFoundException
-
copyResources
Creates links to Javadoc resources in the top-level directory (not from "doc-files
" subdirectories). While the Maven documentation said that the "src/main/javadoc
" directory is copied by default, or a directory can be specified with<javadocResourcesDirectory>
, I have been unable to make it work even with absolute paths.- Parameters:
outputDirectory
- the directory where to copy the resource files.inputFile
- the directory containing resources.- Throws:
IOException
- if an error occurred while reading or writing.
-
error
Reports an I/O errors.
-