|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.javadoc.Doclet
org.asciidoctor.Asciidoclet
public class Asciidoclet
Asciidoclet is a Javadoc Doclet that uses Asciidoctor (via the Asciidoctor Java integration) to render AsciiDoc markup within Javadoc comments.
Asciidoclet may be used via a custom doclet in the maven-javadoc-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
<configuration>
<source>1.7</source>
<doclet>org.asciidoctor.Asciidoclet</doclet>
<docletArtifact>
<groupId>org.asciidoctor</groupId>
<artifactId>asciidoclet</artifactId>
<version>${project.version}</version>
</docletArtifact>
<additionalparam>-include-basedir ${project.basedir}</additionalparam> <!-- <1> -->
<linksource>true</linksource>
</configuration>
</plugin>
The -includes-basedir option must be set, typically this is the project root. It allows source inclusions within javadocs, relative to the specified directory.
/**
* = Asciidoclet
*
* A Javadoc Doclet that uses http://asciidoctor.org[Asciidoctor]
* to render http://asciidoc.org[AsciiDoc] markup in Javadoc comments.
*
* @author https://github.com/johncarl81[John Ericksen]
*/
public class Asciidoclet extends Doclet {
private final Asciidoctor asciidoctor = Asciidoctor.Factory.create(); // <1>
@SuppressWarnings("UnusedDeclaration")
public static boolean start(RootDoc rootDoc) {
new Asciidoclet().render(rootDoc); // <2>
return Standard.start(rootDoc);
}
}
Creates an instance of the Asciidoctor Java integration
Runs Javadoc comment strings through Asciidoctor
code() or code()
Doc Writer <doc@example.com>
AsciiDoc is a lightweight markup language.
Learn more about it at http://asciidoctor.org.
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
bullet
| Column 1 | Column 2 | Column 3 |
|---|---|---|
1 |
Item 1 |
a |
2 |
Item 2 |
b |
3 |
Item 3 |
c |
|
Important
|
Check this out! |
Asciidoclet| Constructor Summary | |
|---|---|
Asciidoclet()
|
|
| Method Summary | |
|---|---|
static void |
exampleDeprecated(String field)
Deprecated. for example purposes |
static com.sun.javadoc.LanguageVersion |
languageVersion()
|
static int |
optionLength(String option)
|
static boolean |
start(com.sun.javadoc.RootDoc rootDoc)
|
static boolean |
validOptions(String[][] options,
com.sun.javadoc.DocErrorReporter errorReporter)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Asciidoclet()
| Method Detail |
|---|
public static void exampleDeprecated(String field)
throws Exception
exampleDeprecated("do not use");
Exception - example
RuntimeException - examplepublic static com.sun.javadoc.LanguageVersion languageVersion()
Sets the language version to Java 5.
Javadoc spec requirement.
public static int optionLength(String option)
Sets the option length to the standard Javadoc option length.
Javadoc spec requirement.
option - input option
public static boolean start(com.sun.javadoc.RootDoc rootDoc)
The starting point of Javadoc render.
Javadoc spec requirement.
rootDoc - input class documents
public static boolean validOptions(String[][] options,
com.sun.javadoc.DocErrorReporter errorReporter)
Processes the input options by delegating to the standard handler.
Javadoc spec requirement.
options - input option arrayerrorReporter - error handling
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||