de.kruis.padoclet
Class PublishedApiDoclet

java.lang.Object
  extended by de.kruis.padoclet.FilterDocletBase
      extended by de.kruis.padoclet.PublishedApiDoclet
All Implemented Interfaces:
HalfDynamicProxy.MessageInterface

public class PublishedApiDoclet
extends FilterDocletBase

This class is a java 1.5 doclet, that is used as a filter between the javadoc framework and another doclet, that produces some output. The PublishedApiDoclet limits the packages, classes, fields, methods seen by the second doclet based on exclude and include tags. Technically this class is an application of the FilterDocletBase class.


Nested Class Summary
static class PublishedApiDoclet.AnnotationDescHandler
          Proxy methods for AnnotationDesc instances.
static class PublishedApiDoclet.AnnotationTypeDocHandler
          Proxy methods for ClassDoc instances.
static class PublishedApiDoclet.ClassDocHandler
          Proxy methods for ClassDoc instances.
static class PublishedApiDoclet.DocHandler
          Proxy methods and state common to all Doc instances.
static class PublishedApiDoclet.MethodDocHandler
          Proxy methods for the MethodDoc instance.
static class PublishedApiDoclet.PackageDocHandler
          Proxy methods for PackageDoc instances.
static class PublishedApiDoclet.RootDocHandler
          Proxy methods for the RootDoc instance.
 
Nested classes/interfaces inherited from class de.kruis.padoclet.FilterDocletBase
FilterDocletBase.ComparableHandler, FilterDocletBase.HandlerBase, FilterDocletBase.Option
 
Field Summary
private  boolean defaultIsExclude
          the default mode.
private  int defaultPriority
          the priority of the default setting.
private  boolean disableJavadocFilter
          If true, retrieve all items from the javadoc core.
private  boolean dontFilterAnnotationElements
          If true, do not filter annotation elements
private  boolean dontFilterEnumConstants
          If true, do not filter enum constants
private  java.util.regex.Pattern excludeChildsFilter
          the excludeChilds filter regular expression.
private  java.lang.String excludeChildsTag
          the name of the excludeChilds tag.
private  java.util.regex.Pattern excludeFilter
          the exclude filter regular expression.
private  java.lang.String excludeTag
          the name of the exclude tag.
private  java.util.regex.Pattern forceIncludeFilter
          the forceInclude filter regular expression.
private  java.lang.String forceIncludeTag
          the name of the forceInclude tag.
private  boolean ignoreJavadocIsIncluded
          If true, don't call Doc.isIncluded().
private  java.util.regex.Pattern includeFilter
          the include filter regular expression.
private  java.lang.String includeTag
          the name of the include tag.
 
Fields inherited from class de.kruis.padoclet.FilterDocletBase
PAD_DELEGATE_DOCLET_SYSTEM_PROPERTY
 
Fields inherited from interface de.kruis.padoclet.util.HalfDynamicProxy.MessageInterface
PRIORITY_DEBUG, PRIORITY_ERROR, PRIORITY_WARN
 
Constructor Summary
private PublishedApiDoclet()
          Create a new instance
 
Method Summary
 int getDefaultPriority()
           
 java.lang.String getExcludeChildsFilter()
           
 java.util.regex.Pattern getExcludeChildsFilterPat()
           
 java.lang.String getExcludeChildsTag()
           
 java.lang.String getExcludeFilter()
           
 java.util.regex.Pattern getExcludeFilterPat()
           
 java.lang.String getExcludeTag()
           
 java.lang.String getForceIncludeFilter()
           
 java.util.regex.Pattern getForceIncludeFilterPat()
           
 java.lang.String getForceIncludeTag()
           
 java.lang.String getIncludeFilter()
           
 java.util.regex.Pattern getIncludeFilterPat()
           
 java.lang.String getIncludeTag()
           
 boolean isDefaultIsExclude()
           
 boolean isDisableJavadocFilter()
           
 boolean isDontFilterAnnotationElements()
           
 boolean isDontFilterEnumConstants()
           
 boolean isIgnoreJavadocIsIncluded()
           
static com.sun.javadoc.LanguageVersion languageVersion()
          Implements the doclet languageVersion method.
static void main(java.lang.String[] args)
          A main method.
static int optionLength(java.lang.String option)
          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 setDefaultIsExclude(boolean defaultIsExclude)
           
 void setDefaultPriority(int defaultPriority)
           
 void setDisableJavadocFilter(boolean disableJavadocFilter)
           
 void setDontFilterAnnotationElements(boolean dontFilterAnnotationElements)
           
 void setDontFilterEnumConstants(boolean dontFilterEnumConstants)
           
 void setExcludeChildsFilter(java.lang.String excludeChildsFilter)
           
 void setExcludeChildsTag(java.lang.String excludeChildsTag)
           
 void setExcludeFilter(java.lang.String excludeFilter)
           
 void setExcludeTag(java.lang.String excludeTag)
           
 void setForceIncludeFilter(java.lang.String forceIncludeFilter)
           
 void setForceIncludeTag(java.lang.String forceIncludeTag)
           
 void setIgnoreJavadocIsIncluded(boolean ignoreJavadocIsIncluded)
           
 void setIncludeFilter(java.lang.String includeFilter)
           
 void setIncludeTag(java.lang.String includeTag)
           
static boolean start(com.sun.javadoc.RootDoc root)
          The doclet start method.
static boolean validOptions(java.lang.String[][] options, com.sun.javadoc.DocErrorReporter reporter)
          Implements the doclet validOptions method
 
Methods inherited from class de.kruis.padoclet.FilterDocletBase
emitMessage, filterOptions, getErrorReporter, languageVersionHelper, optionLengthHelper, setErrorReporter, startHelper, validOptionsHelper
 

Field Detail

excludeTag

private java.lang.String excludeTag
the name of the exclude tag. Default is pad.exclude.


excludeFilter

private java.util.regex.Pattern excludeFilter
the exclude filter regular expression.


includeTag

private java.lang.String includeTag
the name of the include tag. Default is pad.include.


includeFilter

private java.util.regex.Pattern includeFilter
the include filter regular expression.


forceIncludeTag

private java.lang.String forceIncludeTag
the name of the forceInclude tag. Default is pad.forceInclude.


forceIncludeFilter

private java.util.regex.Pattern forceIncludeFilter
the forceInclude filter regular expression.


excludeChildsTag

private java.lang.String excludeChildsTag
the name of the excludeChilds tag. Default is pad.excludeChilds.


excludeChildsFilter

private java.util.regex.Pattern excludeChildsFilter
the excludeChilds filter regular expression.


defaultIsExclude

private boolean defaultIsExclude
the default mode. If true, everything is excluded by default. Default is false / include.


defaultPriority

private int defaultPriority
the priority of the default setting. A positive value. Default is 1.


disableJavadocFilter

private boolean disableJavadocFilter
If true, retrieve all items from the javadoc core. Otherwise retrieve only the included subset.


ignoreJavadocIsIncluded

private boolean ignoreJavadocIsIncluded
If true, don't call Doc.isIncluded().


dontFilterEnumConstants

private boolean dontFilterEnumConstants
If true, do not filter enum constants


dontFilterAnnotationElements

private boolean dontFilterAnnotationElements
If true, do not filter annotation elements

Constructor Detail

PublishedApiDoclet

private PublishedApiDoclet()
Create a new instance

Method Detail

isDefaultIsExclude

public final boolean isDefaultIsExclude()
Returns:
Returns the defaultIsExclude.

setDefaultIsExclude

public final void setDefaultIsExclude(boolean defaultIsExclude)
Parameters:
defaultIsExclude - The defaultIsExclude to set.

getDefaultPriority

public final int getDefaultPriority()
Returns:
Returns the defaultPriority.

setDefaultPriority

public final void setDefaultPriority(int defaultPriority)
Parameters:
defaultPriority - The defaultPriority to set.

isDisableJavadocFilter

public final boolean isDisableJavadocFilter()
Returns:
Returns the disableJavadocFilter.

setDisableJavadocFilter

public final void setDisableJavadocFilter(boolean disableJavadocFilter)
Parameters:
disableJavadocFilter - The disableJavadocFilter to set.

getExcludeChildsFilter

public final java.lang.String getExcludeChildsFilter()
Returns:
Returns the excludeChildsFilter.

getExcludeChildsFilterPat

public final java.util.regex.Pattern getExcludeChildsFilterPat()

setExcludeChildsFilter

public final void setExcludeChildsFilter(java.lang.String excludeChildsFilter)
Parameters:
excludeChildsFilter - The excludeChildsFilter to set.

getExcludeChildsTag

public final java.lang.String getExcludeChildsTag()
Returns:
Returns the excludeChildsTag.

setExcludeChildsTag

public final void setExcludeChildsTag(java.lang.String excludeChildsTag)
Parameters:
excludeChildsTag - The excludeChildsTag to set.

getExcludeFilter

public final java.lang.String getExcludeFilter()
Returns:
Returns the excludeFilter.

getExcludeFilterPat

public final java.util.regex.Pattern getExcludeFilterPat()

setExcludeFilter

public final void setExcludeFilter(java.lang.String excludeFilter)
Parameters:
excludeFilter - The excludeFilter to set.

getForceIncludeFilter

public final java.lang.String getForceIncludeFilter()
Returns:
Returns the forceIncludeFilter.

getForceIncludeFilterPat

public final java.util.regex.Pattern getForceIncludeFilterPat()

setForceIncludeFilter

public final void setForceIncludeFilter(java.lang.String forceIncludeFilter)
Parameters:
forceIncludeFilter - The forceIncludeFilter to set.

getForceIncludeTag

public final java.lang.String getForceIncludeTag()
Returns:
Returns the forceIncludeTag.

setForceIncludeTag

public final void setForceIncludeTag(java.lang.String forceIncludeTag)
Parameters:
forceIncludeTag - The forceIncludeTag to set.

isIgnoreJavadocIsIncluded

public final boolean isIgnoreJavadocIsIncluded()
Returns:
Returns the ignoreJavadocIsIncluded.

setIgnoreJavadocIsIncluded

public final void setIgnoreJavadocIsIncluded(boolean ignoreJavadocIsIncluded)
Parameters:
ignoreJavadocIsIncluded - The ignoreJavadocIsIncluded to set.

getIncludeFilter

public final java.lang.String getIncludeFilter()
Returns:
Returns the includeFilter.

getIncludeFilterPat

public final java.util.regex.Pattern getIncludeFilterPat()

setIncludeFilter

public final void setIncludeFilter(java.lang.String includeFilter)
Parameters:
includeFilter - The includeFilter to set.

getExcludeTag

public final java.lang.String getExcludeTag()
Returns:
Returns the excludeTag.

setExcludeTag

public final void setExcludeTag(java.lang.String excludeTag)
Parameters:
excludeTag - The excludeTag to set.

getIncludeTag

public final java.lang.String getIncludeTag()
Returns:
Returns the includeTag.

setIncludeTag

public final void setIncludeTag(java.lang.String includeTag)
Parameters:
includeTag - The includeTag to set.

isDontFilterAnnotationElements

public final boolean isDontFilterAnnotationElements()
Returns:
the dontFilterAnnotationElements

setDontFilterAnnotationElements

public final void setDontFilterAnnotationElements(boolean dontFilterAnnotationElements)
Parameters:
dontFilterAnnotationElements - the dontFilterAnnotationElements to set

isDontFilterEnumConstants

public final boolean isDontFilterEnumConstants()
Returns:
the dontFilterEnumConstants

setDontFilterEnumConstants

public final void setDontFilterEnumConstants(boolean dontFilterEnumConstants)
Parameters:
dontFilterEnumConstants - the dontFilterEnumConstants to set

languageVersion

public static com.sun.javadoc.LanguageVersion languageVersion()
Implements the doclet languageVersion method. This version of PA doclet only supports LanguageVersion.JAVA_1_5.

Returns:
the supported language version

validOptions

public static boolean validOptions(java.lang.String[][] options,
                                   com.sun.javadoc.DocErrorReporter reporter)
                            throws java.io.IOException
Implements the doclet validOptions method

Parameters:
options - the options
reporter - used to emit messages
Returns:
true, is everything is ok, false otherwise.
Throws:
java.io.IOException
See Also:
Doclet.validOptions(java.lang.String[][], com.sun.javadoc.DocErrorReporter)

optionLength

public static int optionLength(java.lang.String option)
The doclet optionLength method.

Parameters:
option - the name of the option
Returns:
the length or 0, if the option is unknown
See Also:
Doclet.optionLength(java.lang.String)

start

public static boolean start(com.sun.javadoc.RootDoc root)
                     throws java.io.IOException
The doclet start method.

Parameters:
root - the RootDoc object
Returns:
true, if everything is ok, otherwise false.
Throws:
java.io.IOException
See Also:
Doclet.start(com.sun.javadoc.RootDoc)

preDelegateStartHook

protected void preDelegateStartHook(com.sun.javadoc.RootDoc filteredRootDoc)
Description copied from class: FilterDocletBase
Hook method called prior to the start-method of the delegate doclet. This implementation is an empty method, that does nothing. Override this method, if you want to perform any operations within this hook.

Overrides:
preDelegateStartHook in class FilterDocletBase
Parameters:
filteredRootDoc - the filtered RootDoc.

main

public static void main(java.lang.String[] args)
A main method. This method simply calls the doclet main method.

Parameters:
args - the command line arguments
See Also:
Main.execute(java.lang.String, java.lang.String, java.lang.String[])