org.schmant.task.template.jdk.javadoc
Class AbstractStandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.task.template.jdk.javadoc.AbstractStandardDocletDecorator<T>
All Implemented Interfaces:
TargetConfigurable<T>, TaskDecorator, JavadocTaskDecorator, StandardDocletDecorator<T>, ValidatingDecorator
Direct Known Subclasses:
ExtStandardDocletDecorator

public abstract class AbstractStandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
extends AbstractArgumentChecker
implements TargetConfigurable<T>, StandardDocletDecorator<T>

Abstract base class for StandardDocletDecorator implementations.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
AbstractStandardDocletDecorator()
           
 
Method Summary
 T addExcludeDocFilesSubdir(String name)
          Corresponds to one segment of the Standard doclet's -excludedocfilessubdir parameter.
 T addExcludeDocFilesSubdirs(Object o)
          Corresponds to setting a segment of the Standard doclet's -excludedocfilessubdir parameter for each object in the collection.
 T addGroup(JavadocPackageGroup pg)
          Add one package group.
 T addGroup(String heading, String packages)
          Add one package group.
 T addGroups(Object o)
          Add a collection of package groups.
 T addLink(String l)
          Corresponds to the Standard doclet's -link parameter.
 T addLinks(Object o)
          Add a collection of links to the Standard doclet.
 T addNoQualifierPackage(String name)
          Corresponds to one segment of the Standard doclet's -noqualifier parameter.
 T addNoQualifierPackages(Object o)
          Corresponds to setting a segment of the Standard doclet's -noqualifier parameter for each object in the collection.
 T addOfflineLink(String l)
          Corresponds to the Standard doclet's -linkoffline parameter.
 T addOfflineLinks(Object o)
          Add a collection of links.
 T disableComment(boolean b)
          Corresponds to the Standard doclet's -nocomment flag.
 T disableDeprecated(boolean b)
          Corresponds to the Standard doclet's -nodeprecated flag.
 T disableDeprecatedList(boolean b)
          Corresponds to the Standard doclet's -nodeprecatedlist flag.
 T disableHelp(boolean b)
          Corresponds to the Standard doclet's -nohelp flag.
 T disableIndex(boolean b)
          Corresponds to the Standard doclet's -noindex flag.
 T disableNavbar(boolean b)
          Corresponds to the Standard doclet's -nonavbar flag.
 T disableSince(boolean b)
          Corresponds to the Standard doclet's -nosince flag.
 T disableTimestamp(boolean b)
          Corresponds to the Standard doclet's -notimestamp flag.
 T disableTree(boolean b)
          Corresponds to the Standard doclet's -notree flag.
protected  String getBottom()
           
protected  String getCharset()
           
protected  String getDocEncoding()
           
protected  String getDocTitle()
           
protected  Collection<String> getExcludeDocFilesSubdirs()
           
protected  String getFooter()
           
protected  Collection<JavadocPackageGroup> getGroups()
           
protected  String getHeader()
           
protected  Object getHelpFile()
           
protected  Collection<String> getLinks()
           
protected  Collection<String> getNoQualifierPackages()
           
protected  Collection<String> getOfflineLinks()
           
protected  Object getStylesheetFile()
           
protected  Object getTarget()
           
protected  T getThis()
           
protected  String getWindowTitle()
           
protected  boolean isAuthor()
           
protected  boolean isCommentDisabled()
           
protected  boolean isDeprecatedDisabled()
           
protected  boolean isDeprecatedListDisabled()
           
protected  boolean isDocFilesSubdirs()
           
protected  boolean isHelpDisabled()
           
protected  boolean isIndexDisabled()
           
protected  boolean isKeywords()
           
protected  boolean isLinkSource()
           
protected  boolean isNavbarDisabled()
           
protected  boolean isSerialWarn()
           
protected  boolean isSinceDisabled()
           
protected  boolean isSplitIndex()
           
protected  boolean isTimestampDisabled()
           
protected  boolean isTreeDisabled()
           
protected  boolean isUse()
           
protected  boolean isVersion()
           
 T setAuthor(boolean b)
          Corresponds to the Standard doclet's -author flag.
 T setBottom(String b)
          Corresponds to the Standard doclet's -bottom parameter.
 T setCharset(String name)
          Corresponds to the Standard doclet's -charset parameter.
 T setDocEncoding(String name)
          Corresponds to the Standard doclet's -docencoding parameter.
 T setDocFilesSubdirs(boolean b)
          Corresponds to the Standard doclet's -docfilessubdirs flag.
 T setDocTitle(String title)
          Corresponds to the Standard doclet's -doctitle parameter.
 T setFooter(String f)
          Corresponds to the Standard doclet's -footer parameter.
 T setHeader(String h)
          Corresponds to the Standard doclet's -header parameter.
 T setHelpFile(Object o)
          Corresponds to the Standard doclet's -helpfile parameter.
 T setKeywords(boolean b)
          Corresponds to the Standard doclet's -keywords flag.
 T setLinkSource(boolean b)
          Corresponds to the Standard doclet's -linksource flag.
 T setSerialWarn(boolean b)
          Corresponds to the Standard doclet's -serialwarn flag.
 T setSplitIndex(boolean b)
          Corresponds to the Standard doclet's -splitindex flag.
 T setStylesheetFile(Object o)
          Corresponds to the Standard doclet's -stylesheetfile flag.
 T setTarget(Object o)
          Set the target.
 T setUse(boolean b)
          Corresponds to the Standard doclet's -use flag.
 T setVersion(boolean b)
          Corresponds to the Standard doclet's -version flag.
 T setWindowTitle(String title)
          Corresponds to the Standard doclet's -windowtitle parameter.
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.schmant.task.ValidatingDecorator
validate
 

Constructor Detail

AbstractStandardDocletDecorator

public AbstractStandardDocletDecorator()
Method Detail

getThis

protected final T getThis()

setTarget

public final T setTarget(Object o)
Description copied from interface: TargetConfigurable
Set the target.

Specified by:
setTarget in interface TargetConfigurable<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - The target.
Returns:
this

getTarget

protected final Object getTarget()

setUse

public final T setUse(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -use flag.

The default value for this property is false.

Specified by:
setUse in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Generate usage pages for each documented class and package?
Returns:
this.

isUse

protected final boolean isUse()

setVersion

public final T setVersion(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -version flag.

The default value for this property is false.

Specified by:
setVersion in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should version information be included?
Returns:
this

isVersion

protected final boolean isVersion()

setAuthor

public final T setAuthor(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -author flag.

The default value for this property is false.

Specified by:
setAuthor in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should author information be included?
Returns:
this

isAuthor

protected final boolean isAuthor()

setSplitIndex

public final T setSplitIndex(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -splitindex flag.

The default value for this property is false.

Specified by:
setSplitIndex in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the index file be split into multiple files?
Returns:
this

isSplitIndex

protected final boolean isSplitIndex()

setWindowTitle

public final T setWindowTitle(String title)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -windowtitle parameter.

The default value for this property is the value of the docTitle property. (See StandardDocletDecorator.setDocTitle(String).)

Specified by:
setWindowTitle in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
title - The value of the HTML title tag in the generated documentation.
Returns:
this
See Also:
StandardDocletDecorator.setDocTitle(String)

getWindowTitle

protected final String getWindowTitle()

setDocTitle

public final T setDocTitle(String title)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -doctitle parameter.

The default value for this property is empty.

Specified by:
setDocTitle in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
title - The title for the overview summary file in the documentation.
Returns:
this
See Also:
StandardDocletDecorator.setWindowTitle(String)

getDocTitle

protected final String getDocTitle()

setHeader

public final T setHeader(String h)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -header parameter.

The default value for this property is empty.

Specified by:
setHeader in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
h - The header placed at the top of each generated file.
Returns:
this

getHeader

protected final String getHeader()

setFooter

public final T setFooter(String f)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -footer parameter.

The default value for this property is empty.

Specified by:
setFooter in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
f - The footer text placed at the bottom of each generated file.
Returns:
this

getFooter

protected final String getFooter()

setBottom

public final T setBottom(String b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -bottom parameter.

The default value for this property is empty.

Specified by:
setBottom in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - The text placed at the bottom of each generated file.
Returns:
this

getBottom

protected final String getBottom()

addLink

public final T addLink(String l)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -link parameter.

The default value for this property is empty.

Specified by:
addLink in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
l - An URL for external API documentation.
Returns:
this

addLinks

public final T addLinks(Object o)
Description copied from interface: StandardDocletDecorator
Add a collection of links to the Standard doclet. This corresponds to using the -link parameter for each link in the collection.

Specified by:
addLinks in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - A collection of links.
Returns:
this

getLinks

protected final Collection<String> getLinks()

addOfflineLink

public final T addOfflineLink(String l)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -linkoffline parameter.

The default value for this property is empty.

Specified by:
addOfflineLink in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
l - An URL for external API documentation.
Returns:
this

addOfflineLinks

public final T addOfflineLinks(Object o)
Description copied from interface: StandardDocletDecorator
Add a collection of links. This corresponds to using the -offlinelink parameter for each link in the collection.

Specified by:
addOfflineLinks in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - A collection of links.
Returns:
this

getOfflineLinks

protected final Collection<String> getOfflineLinks()

setLinkSource

public final T setLinkSource(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -linksource flag.

The default value for this property is false.

Specified by:
setLinkSource in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should a HTML version of each source file be generated?
Returns:
this

isLinkSource

protected final boolean isLinkSource()

addGroup

public final T addGroup(String heading,
                        String packages)
Description copied from interface: StandardDocletDecorator
Add one package group. Corresponds to the Standard doclet's -group parameter.

Specified by:
addGroup in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
heading - The group name.
packages - The packages included in the group.
Returns:
this

addGroup

public final T addGroup(JavadocPackageGroup pg)
Description copied from interface: StandardDocletDecorator
Add one package group. Corresponds to the Standard doclet's -group parameter.

Specified by:
addGroup in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
pg - The package group.
Returns:
this

addGroups

public final T addGroups(Object o)
Description copied from interface: StandardDocletDecorator
Add a collection of package groups. Corresponds to giving the Standard doclet's -group parameter for each object in the collection.

Specified by:
addGroups in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - The collection
Returns:
this

getGroups

protected final Collection<JavadocPackageGroup> getGroups()

disableDeprecated

public final T disableDeprecated(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -nodeprecated flag.

The default value for this property is false.

Specified by:
disableDeprecated in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the generation of documentation for deprecated items be disabled?
Returns:
this

isDeprecatedDisabled

protected final boolean isDeprecatedDisabled()

disableDeprecatedList

public final T disableDeprecatedList(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -nodeprecatedlist flag.

The default value for this property is false.

Specified by:
disableDeprecatedList in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the generation of the deprecation list file (deprecated-list.html) be disabled?
Returns:
this

isDeprecatedListDisabled

protected final boolean isDeprecatedListDisabled()

disableSince

public final T disableSince(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -nosince flag.

The default value for this property is false.

Specified by:
disableSince in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the @since tag be ignored?
Returns:
this

isSinceDisabled

protected final boolean isSinceDisabled()

disableTree

public final T disableTree(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -notree flag.

The default value for this property is false.

Specified by:
disableTree in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the generation of class/interface hierarchy pages be disabled?
Returns:
this

isTreeDisabled

protected final boolean isTreeDisabled()

disableIndex

public final T disableIndex(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -noindex flag.

The default value for this property is false.

Specified by:
disableIndex in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the generation of the documentation index page be disabled?
Returns:
this

isIndexDisabled

protected final boolean isIndexDisabled()

disableHelp

public final T disableHelp(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -nohelp flag.

The default value for this property is false.

Specified by:
disableHelp in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the HELP link be disabled?
Returns:
this

isHelpDisabled

protected final boolean isHelpDisabled()

disableNavbar

public final T disableNavbar(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -nonavbar flag.

The default value for this property is false.

Specified by:
disableNavbar in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the generation of the navigation bar be disabled?
Returns:
this

isNavbarDisabled

protected final boolean isNavbarDisabled()

setHelpFile

public final T setHelpFile(Object o)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -helpfile parameter.

Set the path to an external help file. The path is interpreted by InterpretAsFileStrategy.

The default value for this property is empty.

Specified by:
setHelpFile in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - The path to a help file.
Returns:
this

getHelpFile

protected final Object getHelpFile()

setStylesheetFile

public final T setStylesheetFile(Object o)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -stylesheetfile flag.

Set the path to an external stylesheet (CSS) file. The path is interpreted by InterpretAsFileStrategy.

The default value for this property is empty.

Specified by:
setStylesheetFile in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - The path to an external stylesheet file.
Returns:
this

getStylesheetFile

protected final Object getStylesheetFile()

setSerialWarn

public final T setSerialWarn(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -serialwarn flag.

The default value for this property is false.

Specified by:
setSerialWarn in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should the Javadoc compiler warn on missing @serial tags?
Returns:
this

isSerialWarn

protected final boolean isSerialWarn()

setCharset

public final T setCharset(String name)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -charset parameter.

The default value for this property is empty.

Specified by:
setCharset in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
name - The MIME name for a charset.
Returns:
this
See Also:
StandardDocletDecorator.setDocEncoding(String)

getCharset

protected final String getCharset()

setDocEncoding

public final T setDocEncoding(String name)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -docencoding parameter.

The default value for this property is empty.

Specified by:
setDocEncoding in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
name - The MIME name for a charset.
Returns:
this
See Also:
StandardDocletDecorator.setCharset(String)

getDocEncoding

protected final String getDocEncoding()

setKeywords

public final T setKeywords(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -keywords flag.

The default value for this property is false.

Specified by:
setKeywords in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Should HTML META tag keywords be added for each class?
Returns:
this

isKeywords

protected final boolean isKeywords()

setDocFilesSubdirs

public final T setDocFilesSubdirs(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -docfilessubdirs flag.

The default value for this property is false.

Specified by:
setDocFilesSubdirs in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Enable deep copying of doclet files?
Returns:
this

isDocFilesSubdirs

protected final boolean isDocFilesSubdirs()

addExcludeDocFilesSubdir

public final T addExcludeDocFilesSubdir(String name)
Description copied from interface: StandardDocletDecorator
Corresponds to one segment of the Standard doclet's -excludedocfilessubdir parameter.

Specified by:
addExcludeDocFilesSubdir in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
name - A doc file subdir to exclude.
Returns:
this

addExcludeDocFilesSubdirs

public final T addExcludeDocFilesSubdirs(Object o)
Description copied from interface: StandardDocletDecorator
Corresponds to setting a segment of the Standard doclet's -excludedocfilessubdir parameter for each object in the collection.

Specified by:
addExcludeDocFilesSubdirs in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - A collection of doc files subdirs to exclude.
Returns:
this

getExcludeDocFilesSubdirs

protected final Collection<String> getExcludeDocFilesSubdirs()

addNoQualifierPackage

public final T addNoQualifierPackage(String name)
Description copied from interface: StandardDocletDecorator
Corresponds to one segment of the Standard doclet's -noqualifier parameter.

Specified by:
addNoQualifierPackage in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
name - A name for a package that should not be fully qualified in the documentation.
Returns:
this

addNoQualifierPackages

public final T addNoQualifierPackages(Object o)
Description copied from interface: StandardDocletDecorator
Corresponds to setting a segment of the Standard doclet's -noqualifier parameter for each object in the collection.

Specified by:
addNoQualifierPackages in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
o - A collection of names.
Returns:
this

getNoQualifierPackages

protected final Collection<String> getNoQualifierPackages()

disableTimestamp

public final T disableTimestamp(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -notimestamp flag.

The default value for this property is false.

Specified by:
disableTimestamp in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Disable the timestamp hidden in each documentation file?
Returns:
this

isTimestampDisabled

protected final boolean isTimestampDisabled()

disableComment

public final T disableComment(boolean b)
Description copied from interface: StandardDocletDecorator
Corresponds to the Standard doclet's -nocomment flag.

The default value for this property is false.

Specified by:
disableComment in interface StandardDocletDecorator<T extends AbstractStandardDocletDecorator<T>>
Parameters:
b - Disable the entire comment body?
Returns:
this

isCommentDisabled

protected final boolean isCommentDisabled()