org.codehaus.groovy.ant
Class Groovydoc

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.codehaus.groovy.ant.Groovydoc
All Implemented Interfaces:
java.lang.Cloneable

public class Groovydoc
extends org.apache.tools.ant.Task

Access to the GroovyDoc tool from Ant.

Version:
$Id$

Field Summary
private  boolean author
           
private  java.io.File destDir
           
private static java.lang.String DOCGEN_BASEDIR
           
private  java.lang.String docTitle
           
private  java.util.List<java.lang.String> excludePackageNames
           
private  java.lang.String footer
           
private  java.lang.String header
           
private  boolean includeNoSourcePackages
           
private  java.util.List<LinkArgument> links
           
private  LoggingHelper log
           
private  java.io.File overviewFile
           
private  java.util.List<java.lang.String> packageNames
           
private  boolean packageScope
           
private  java.util.List<org.apache.tools.ant.types.DirSet> packageSets
           
private  boolean privateScope
           
private  boolean protectedScope
           
private  boolean publicScope
           
private  java.util.List<java.lang.String> sourceFilesToDoc
           
private  org.apache.tools.ant.types.Path sourcePath
           
private static java.lang.String TEMPLATE_BASEDIR
           
private  boolean useDefaultExcludes
           
private  java.lang.String windowTitle
           
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
Groovydoc()
           
 
Method Summary
 LinkArgument createLink()
          Create link to Javadoc/GroovyDoc output at the given URL.
 void execute()
           
private  void parsePackages(java.util.List<java.lang.String> resultantPackages, org.apache.tools.ant.types.Path sourcePath)
          Add the directories matched by the nested dirsets to the resulting packages list and the base directories of the dirsets to the Path.
 void setAuthor(boolean author)
          If set to false, author will not be displayed.
 void setDestdir(java.io.File dir)
          Set the directory where the Groovydoc output will be generated.
 void setDoctitle(java.lang.String htmlTitle)
          Set the title for the overview page.
 void setFooter(java.lang.String footer)
          Set the footer to place at the bottom of each generated html page.
 void setHeader(java.lang.String header)
          Specifies the header text to be placed at the top of each output file.
 void setOverview(java.io.File file)
          Specify the file containing the overview to be included in the generated documentation.
 void setPackage(boolean b)
          Indicate whether only package, protected and public classes and members are to be included in the scope processed.
 void setPackagenames(java.lang.String packages)
          Set the package names to be processed.
 void setPrivate(boolean b)
          Indicate whether all classes and members are to be included in the scope processed.
 void setProtected(boolean b)
          Indicate whether only protected and public classes and members are to be included in the scope processed.
 void setPublic(boolean b)
          Indicate whether only public classes and members are to be included in the scope processed.
 void setSourcepath(org.apache.tools.ant.types.Path src)
          Specify where to find source file
 void setUse(boolean b)
           
 void setWindowtitle(java.lang.String title)
          Set the title to be placed in the HTML <title> tag of the generated documentation.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE_BASEDIR

private static final java.lang.String TEMPLATE_BASEDIR
See Also:
Constant Field Values

DOCGEN_BASEDIR

private static final java.lang.String DOCGEN_BASEDIR
See Also:
Constant Field Values

log

private final LoggingHelper log

sourcePath

private org.apache.tools.ant.types.Path sourcePath

destDir

private java.io.File destDir

packageNames

private java.util.List<java.lang.String> packageNames

excludePackageNames

private java.util.List<java.lang.String> excludePackageNames

windowTitle

private java.lang.String windowTitle

docTitle

private java.lang.String docTitle

footer

private java.lang.String footer

header

private java.lang.String header

privateScope

private boolean privateScope

protectedScope

private boolean protectedScope

packageScope

private boolean packageScope

publicScope

private boolean publicScope

useDefaultExcludes

private boolean useDefaultExcludes

includeNoSourcePackages

private boolean includeNoSourcePackages

author

private boolean author

packageSets

private java.util.List<org.apache.tools.ant.types.DirSet> packageSets

sourceFilesToDoc

private java.util.List<java.lang.String> sourceFilesToDoc

links

private java.util.List<LinkArgument> links

overviewFile

private java.io.File overviewFile
Constructor Detail

Groovydoc

public Groovydoc()
Method Detail

setSourcepath

public void setSourcepath(org.apache.tools.ant.types.Path src)
Specify where to find source file

Parameters:
src - a Path instance containing the various source directories.

setDestdir

public void setDestdir(java.io.File dir)
Set the directory where the Groovydoc output will be generated.

Parameters:
dir - the destination directory.

setAuthor

public void setAuthor(boolean author)
If set to false, author will not be displayed. Currently not used.

Parameters:
author - new value

setPackagenames

public void setPackagenames(java.lang.String packages)
Set the package names to be processed.

Parameters:
packages - a comma separated list of packages specs (may be wildcarded).

setUse

public void setUse(boolean b)

setWindowtitle

public void setWindowtitle(java.lang.String title)
Set the title to be placed in the HTML <title> tag of the generated documentation.

Parameters:
title - the window title to use.

setDoctitle

public void setDoctitle(java.lang.String htmlTitle)
Set the title for the overview page.

Parameters:
htmlTitle - the html to use for the title.

setOverview

public void setOverview(java.io.File file)
Specify the file containing the overview to be included in the generated documentation.

Parameters:
file - the overview file

setPrivate

public void setPrivate(boolean b)
Indicate whether all classes and members are to be included in the scope processed.

Parameters:
b - true if scope is to be private level.

setPublic

public void setPublic(boolean b)
Indicate whether only public classes and members are to be included in the scope processed. Currently not used.

Parameters:
b - true if scope only includes public level classes and members

setProtected

public void setProtected(boolean b)
Indicate whether only protected and public classes and members are to be included in the scope processed. Currently not used.

Parameters:
b - true if scope includes protected level classes and members

setPackage

public void setPackage(boolean b)
Indicate whether only package, protected and public classes and members are to be included in the scope processed. Currently not used.

Parameters:
b - true if scope includes package level classes and members

setFooter

public void setFooter(java.lang.String footer)
Set the footer to place at the bottom of each generated html page.

Parameters:
footer - the footer value

setHeader

public void setHeader(java.lang.String header)
Specifies the header text to be placed at the top of each output file. The header will be placed to the right of the upper navigation bar. It may contain HTML tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within the header may have to be escaped.

Parameters:
header - the header value

parsePackages

private void parsePackages(java.util.List<java.lang.String> resultantPackages,
                           org.apache.tools.ant.types.Path sourcePath)
Add the directories matched by the nested dirsets to the resulting packages list and the base directories of the dirsets to the Path. It also handles the packages and excludepackages attributes and elements.

Parameters:
resultantPackages - a list to which we add the packages found
sourcePath - a path to which we add each basedir found
Since:
1.5

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

createLink

public LinkArgument createLink()
Create link to Javadoc/GroovyDoc output at the given URL.

Returns:
link argument to configure


Copyright © ${year} The Codehaus. All Rights Reserved.