|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.kruis.padoclet.FilterDocletBase
public class FilterDocletBase
This class is a base class for javadoc filter doclets.
A filter doclet is plugged between the javadoc core and a second
doclet, that is used to create the output. The filter doclet modifies
the information about the java code to be documented. It can hide
java items (as done by the 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.
Nested Class Summary | |
---|---|
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. |
Field Summary | |
---|---|
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. |
Fields inherited from interface de.kruis.padoclet.util.HalfDynamicProxy.MessageInterface |
---|
PRIORITY_DEBUG, PRIORITY_ERROR, PRIORITY_WARN |
Constructor Summary | |
---|---|
protected |
FilterDocletBase()
Create a new FilterDocletBase instance. |
Method Summary | |
---|---|
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. |
Field Detail |
---|
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
Constructor Detail |
---|
protected FilterDocletBase()
FilterDocletBase
instance.
This constructor is protected
, because this
constructor is intended to be called by subclasses only.
Method Detail |
---|
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 parameters
protected static java.lang.String[][] filterOptions(java.lang.String[][] options)
options
- the options as provided by the javadoc core
Doclet.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 doclet
true
, 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 doclet
Doclet.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 object
Doclet.start(com.sun.javadoc.RootDoc)
.
java.io.IOException
protected void preDelegateStartHook(com.sun.javadoc.RootDoc filteredRootDoc)
filteredRootDoc
- the filtered RootDoc.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |