jdiff

Class JDiffAntTask

public class JDiffAntTask extends Object

An Ant task to produce a simple JDiff report. More complex reports still need parameters that are controlled by the Ant Javadoc task.
Nested Class Summary
static classJDiffAntTask.ProjectInfo
This class handles the information about a project, whether it is the older or newer version.
Method Summary
voidaddConfiguredNew(JDiffAntTask.ProjectInfo projInfo)
Used to store the child element named "new", which is under the JDiff task XML element.
voidaddConfiguredOld(JDiffAntTask.ProjectInfo projInfo)
Used to store the child element named "old", which is under the JDiff task XML element.
protected voidaddSourcePaths(Javadoc jd, JDiffAntTask.ProjectInfo proj)
Add the root directories for the given project to the Javadoc sourcepath.
protected voidcompareXML(String oldapiname, String newapiname)
Convenient method to create a Javadoc task, configure it and run it to compare the XML representations of two instances of a project's source files, and generate an HTML report summarizing the differences.
protected voidcopyFile(String src, String dst)
Copy a file from src to dst.
voidexecute()
protected voidgenerateJavadoc(JDiffAntTask.ProjectInfo proj)
Generate the Javadoc for the project.
protected voidgenerateXML(JDiffAntTask.ProjectInfo proj)
Convenient method to create a Javadoc task, configure it and run it to generate the XML representation of a project's source files.
FilegetDestdir()
booleangetDocchanges()
protected StringgetPackageList(JDiffAntTask.ProjectInfo proj)
Return the comma-separated list of packages.
booleangetStats()
booleangetVerbose()
protected JavadocinitJavadoc(String logMsg)
Create a fresh new Javadoc task object and initialize it.
voidsetDestdir(File value)
Used to store the destdir attribute of the JDiff task XML element.
voidsetDocchanges(boolean value)
voidsetProject(Project proj)
Used as part of Ant's startup.
voidsetStats(boolean value)
voidsetVerbose(boolean value)

Method Detail

addConfiguredNew

public void addConfiguredNew(JDiffAntTask.ProjectInfo projInfo)
Used to store the child element named "new", which is under the JDiff task XML element.

addConfiguredOld

public void addConfiguredOld(JDiffAntTask.ProjectInfo projInfo)
Used to store the child element named "old", which is under the JDiff task XML element.

addSourcePaths

protected void addSourcePaths(Javadoc jd, JDiffAntTask.ProjectInfo proj)
Add the root directories for the given project to the Javadoc sourcepath.

compareXML

protected void compareXML(String oldapiname, String newapiname)
Convenient method to create a Javadoc task, configure it and run it to compare the XML representations of two instances of a project's source files, and generate an HTML report summarizing the differences.

Parameters: oldapiname The name of the older version of the project newapiname The name of the newer version of the project

copyFile

protected void copyFile(String src, String dst)
Copy a file from src to dst. Also checks that "destdir/changes" exists

execute

public void execute()

generateJavadoc

protected void generateJavadoc(JDiffAntTask.ProjectInfo proj)
Generate the Javadoc for the project. If you want to generate the Javadoc report for the project with different parameters from the simple ones used here, then use the Javadoc Ant task directly, and set the javadoc attribute to the "old" or "new" element.

Parameters: proj The current Project

generateXML

protected void generateXML(JDiffAntTask.ProjectInfo proj)
Convenient method to create a Javadoc task, configure it and run it to generate the XML representation of a project's source files.

Parameters: proj The current Project

getDestdir

public File getDestdir()

getDocchanges

public boolean getDocchanges()

getPackageList

protected String getPackageList(JDiffAntTask.ProjectInfo proj)
Return the comma-separated list of packages. The list is generated from Ant DirSet tasks, and includes all directories in a hierarchy, e.g. com, com/acme. com/acme/foo. Duplicates are ignored.

getStats

public boolean getStats()

getVerbose

public boolean getVerbose()

initJavadoc

protected Javadoc initJavadoc(String logMsg)
Create a fresh new Javadoc task object and initialize it.

Parameters: logMsg String which appears as a prefix in the Ant log

Returns: The new task.Javadoc object

setDestdir

public void setDestdir(File value)
Used to store the destdir attribute of the JDiff task XML element.

setDocchanges

public void setDocchanges(boolean value)

setProject

public void setProject(Project proj)
Used as part of Ant's startup.

setStats

public void setStats(boolean value)

setVerbose

public void setVerbose(boolean value)