User: ara_e_w Date: 02/02/17 13:12:09 Modified: src/xjavadoc/ant XJavadocTask.java Log: - more compatible with doclet api - modifiers scanning for top level classes - ....! Revision Changes Path 1.2 +121 -34 xjavadoc/src/xjavadoc/ant/XJavadocTask.java Index: XJavadocTask.java =================================================================== RCS file: /cvsroot/xdoclet/xjavadoc/src/xjavadoc/ant/XJavadocTask.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -w -r1.1 -r1.2 --- XJavadocTask.java 21 Dec 2001 11:53:10 -0000 1.1 +++ XJavadocTask.java 17 Feb 2002 21:12:09 -0000 1.2 @@ -1,3 +1,38 @@ +/* + * Copyright (c) 2001, Aslak Hellesøy, BEKK Consulting + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * - Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * - Neither the name of BEKK Consulting nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + */ + +/* + * Change log + * + */ package xjavadoc.ant; import java.io.BufferedOutputStream; @@ -16,28 +51,69 @@ /** * This class should be subclassed to be used for XDoclet, revXDoclet etc. * + * @author Ara Abrahamian + * @created February 17, 2002 */ public class XJavadocTask extends Java { - - public static final String TMP_FILE = System.getProperty( "java.io.tmpdir" ) + File.separator + "xjavadoc.ser"; + /** + * @todo-javadoc Describe the field + */ private final Vector filesets = new Vector(); + /** + * @todo-javadoc Describe the field + */ private String _docletClass; + /** + * @todo-javadoc Describe the field + */ + public final static String TMP_FILE = System.getProperty("java.io.tmpdir") + File.separator + "xjavadoc.ser"; + + + /** + * Describe what the XJavadocTask constructor does + * + * @todo-javadoc Write javadocs for constructor + */ public XJavadocTask() { setClassname( "xjavadoc.ant.XJavadocRunner" ); setFork( true ); setFailonerror( true ); } - public void addFileset(FileSet set) { - filesets.addElement(set); - } + /** + * Sets the Doclet attribute of the XJavadocTask object + * + * @param docletClass The new Doclet value + * @exception BuildException Describe the exception + * @todo-javadoc Write javadocs for exception + */ public void setDoclet(String docletClass) throws BuildException { _docletClass = docletClass; } + + /** + * Describe the method + * + * @param set Describe the method parameter + * @todo-javadoc Describe the method + * @todo-javadoc Describe the method parameter + */ + public void addFileset(FileSet set) { + filesets.addElement(set); + } + + + /** + * Describe what the method does + * + * @exception BuildException Describe the exception + * @todo-javadoc Write javadocs for method + * @todo-javadoc Write javadocs for exception + */ public void execute() throws BuildException { try { for (int i = 0; i < filesets.size(); i++) { @@ -46,9 +122,11 @@ // We only want java source files ds.setIncludes( new String[]{ "**/*.java" }); String[] files = ds.getIncludedFiles(); - XJavaDoc xJavaDoc = new XJavaDoc(fs.getDir(project), files, _docletClass); + XJavaDoc.getInstance().setDir(fs.getDir(project)); + XJavaDoc.getInstance().setFiles(files); + XJavaDoc.getInstance().setDocletClass(_docletClass); - saveContext( xJavaDoc ); + saveContext(XJavaDoc.getInstance()); super.execute(); } @@ -59,8 +137,17 @@ } - private void saveContext( XJavaDoc xJavaDoc ) throws java.io.IOException - { + + /** + * Describe what the method does + * + * @param xJavaDoc Describe what the parameter does + * @exception java.io.IOException Describe the exception + * @todo-javadoc Write javadocs for method + * @todo-javadoc Write javadocs for method parameter + * @todo-javadoc Write javadocs for exception + */ + private void saveContext(XJavaDoc xJavaDoc) throws java.io.IOException { FileOutputStream fos = new FileOutputStream( TMP_FILE ); ObjectOutputStream oos = new ObjectOutputStream( new BufferedOutputStream( fos ) );
_______________________________________________ Xdoclet-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/xdoclet-devel