public class FilterDocletBase extends java.lang.Object implements HalfDynamicProxy.MessageInterface
PublishedApiDoclet
)
or change the information in any other way.
This class is not a doclet by itself. It is intended as a base class for
a doclet. The derived class has to implement the static methods required by
a doclet and to setup the options (FilterDocletBase.Option.register(AbstractOption)
)
and the proxy table (HalfDynamicProxy.setProxyClassTable(Class[][])
).
See PublishedApiDoclet
for an example.
Modifier and Type | Class and Description |
---|---|
static class |
FilterDocletBase.ComparableHandler
This class is the base of all the
HalfDynamicProxy classes for the javadoc *Doc interfaces.
|
private static class |
FilterDocletBase.DH
This class is used to perform a lazy instantiation of the
delegate / formating doclet class.
|
static class |
FilterDocletBase.HandlerBase
This class is the base of all the
HalfDynamicProxy classes for the javadoc interfaces.
|
protected static class |
FilterDocletBase.Option
Option handling for doclets.
|
Modifier and Type | Field and Description |
---|---|
private com.sun.javadoc.DocErrorReporter |
errorReporter
holds the error reporter provided by the javadoc core
|
static java.lang.String |
PAD_DELEGATE_DOCLET_SYSTEM_PROPERTY
The name of the system property, that contains the name of the
delegate doclet.
|
PRIORITY_DEBUG, PRIORITY_ERROR, PRIORITY_WARN
Modifier | Constructor and Description |
---|---|
protected |
FilterDocletBase()
Create a new
FilterDocletBase instance. |
Modifier and Type | Method and Description |
---|---|
private static java.lang.Object |
delegateDocletInvoke(java.lang.String name,
java.lang.Object[] par)
Invoke a static method on the delegate doclet.
|
void |
emitMessage(java.lang.String theMessage,
int priority) |
protected static java.lang.String[][] |
filterOptions(java.lang.String[][] options)
Filter the command line options seen by the formating Doclet.
|
com.sun.javadoc.DocErrorReporter |
getErrorReporter() |
protected static com.sun.javadoc.LanguageVersion |
languageVersionHelper()
Helper method used to implement the doclet
languageVersion
method. |
protected static int |
optionLengthHelper(java.lang.String option,
java.lang.String className)
Helper method used to implement the doclet
optionLength
method. |
protected void |
preDelegateStartHook(com.sun.javadoc.RootDoc filteredRootDoc)
Hook method called prior to the start-method of the delegate doclet.
|
void |
setErrorReporter(com.sun.javadoc.DocErrorReporter errorReporter) |
protected static boolean |
startHelper(com.sun.javadoc.RootDoc root,
FilterDocletBase fd)
Helper method used to implement the doclet
start method. |
protected static boolean |
validOptionsHelper(java.lang.String[][] options,
com.sun.javadoc.DocErrorReporter reporter,
boolean showHelp,
java.lang.String className)
Helper method to ease the implementation of the doclet
validOptions method. |
public static final java.lang.String PAD_DELEGATE_DOCLET_SYSTEM_PROPERTY
com.sun.tools.doclets.standard.Standard
) is used.private com.sun.javadoc.DocErrorReporter errorReporter
protected FilterDocletBase()
FilterDocletBase
instance.
This constructor is protected
, because this
constructor is intended to be called by subclasses only.public final com.sun.javadoc.DocErrorReporter getErrorReporter()
public final void setErrorReporter(com.sun.javadoc.DocErrorReporter errorReporter)
errorReporter
- The errorReporter to set.public void emitMessage(java.lang.String theMessage, int priority)
emitMessage
in interface HalfDynamicProxy.MessageInterface
private static java.lang.Object delegateDocletInvoke(java.lang.String name, java.lang.Object[] par)
name
- name of the method to be invokedpar
- an array, that contains the method parametersprotected static java.lang.String[][] filterOptions(java.lang.String[][] options)
options
- the options as provided by the javadoc coreDoclet.validOptions(java.lang.String[][], com.sun.javadoc.DocErrorReporter)
,
RootDoc.options()
protected static boolean validOptionsHelper(java.lang.String[][] options, com.sun.javadoc.DocErrorReporter reporter, boolean showHelp, java.lang.String className) throws java.io.IOException
validOptions
method.
This method provides all you need in order to implement
Doclet.validOptions(java.lang.String[][], com.sun.javadoc.DocErrorReporter)
.options
- the optionsreporter
- the errorReportershowHelp
- if true
, the method will show an online help message
and return false
.className
- the name of the filter doclettrue
, if all options are valid. Otherwise show a help message
and return false
.java.io.IOException
Doclet.validOptions(java.lang.String[][], com.sun.javadoc.DocErrorReporter)
protected static int optionLengthHelper(java.lang.String option, java.lang.String className)
optionLength
method.option
- the name of the optionclassName
- the name of the filter docletDoclet.optionLength(java.lang.String)
protected static com.sun.javadoc.LanguageVersion languageVersionHelper()
languageVersion
method.
See PublishedApiDoclet.languageVersion()
for an example on how to
use this method.protected static boolean startHelper(com.sun.javadoc.RootDoc root, FilterDocletBase fd) throws java.io.IOException
start
method.
See PublishedApiDoclet.start(RootDoc)
for an example on how to use this
method.root
- the RootDoc object as provided by the javadoc core.fd
- a newly created filter doclet objectDoclet.start(com.sun.javadoc.RootDoc)
.java.io.IOException
protected void preDelegateStartHook(com.sun.javadoc.RootDoc filteredRootDoc)
filteredRootDoc
- the filtered RootDoc.