ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool ClassCPInfo.java ConstantCPInfo.java ConstantPool.java ConstantPoolEntry.java DoubleCPInfo.java FieldRefCPInfo.java FloatCPInfo.java IntegerCPInfo.java InterfaceMethodRefCPInfo.java LongCPInfo.java MethodRefCPInfo.java NameAndTypeCPInfo.java StringCPInfo.java Utf8CPInfo.java
Date Sun, 03 Feb 2002 10:12:17 GMT
conor       02/02/03 02:12:17

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/depend
                        ClassFile.java ClassFileIterator.java
                        ClassFileUtils.java Depend.java
                        DirectoryIterator.java JarFileIterator.java
               src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool
                        ClassCPInfo.java ConstantCPInfo.java
                        ConstantPool.java ConstantPoolEntry.java
                        DoubleCPInfo.java FieldRefCPInfo.java
                        FloatCPInfo.java IntegerCPInfo.java
                        InterfaceMethodRefCPInfo.java LongCPInfo.java
                        MethodRefCPInfo.java NameAndTypeCPInfo.java
                        StringCPInfo.java Utf8CPInfo.java
  Log:
  Clean up of some of the javadoc and style issues in the depend code
  
  Revision  Changes    Path
  1.6       +23 -29    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java
  
  Index: ClassFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- ClassFile.java	8 Jan 2002 23:47:35 -0000	1.5
  +++ ClassFile.java	3 Feb 2002 10:12:16 -0000	1.6
  @@ -63,52 +63,41 @@
   import org.apache.tools.ant.taskdefs.optional.depend.constantpool.ConstantPoolEntry;
   
   /**
  - * A ClassFile object stores information about a Java class.
  - *
  - * The class may be read from a DataInputStream.and written
  - * to a DataOutputStream. These are usually streams from a Java
  - * class file or a class file component of a Jar file.
  + * A ClassFile object stores information about a Java class. The class may
  + * be read from a DataInputStream.and written to a DataOutputStream. These
  + * are usually streams from a Java class file or a class file component of a
  + * Jar file.
    *
    * @author Conor MacNeill
    */
   public class ClassFile {
   
  -    /**
  -     * The Magic Value that marks the start of a Java class file
  -     */
  +    /** The Magic Value that marks the start of a Java class file  */
       private final static int CLASS_MAGIC = 0xCAFEBABE;
   
  -
  -    /**
  -     * This class' constant pool.
  -     */
  +    /** This class' constant pool.  */
       private ConstantPool constantPool;
   
  -
  -    /**
  -     * The class name for this class.
  -     */
  +    /** The class name for this class.  */
       private String className;
   
       /**
  -     * Read the class from a data stream.
  +     * Read the class from a data stream. This method takes an InputStream
  +     * as input and parses the class from the stream. <p>
        *
  -     * This method takes an InputStream as input and
  -     * parses the class from the stream.
  -     * <p>
  -     *
  -     * @param stream an InputStream from which the class will be read
        *
  -     * @throws IOException if there is a problem reading from the given stream.
  -     * @throws ClassFormatError if the class cannot be parsed correctly
        *
  +     * @param stream an InputStream from which the class will be read
  +     * @exception IOException if there is a problem reading from the given
  +     *      stream.
  +     * @exception ClassFormatError if the class cannot be parsed correctly
        */
       public void read(InputStream stream) throws IOException, ClassFormatError {
           DataInputStream classStream = new DataInputStream(stream);
   
  -
           if (classStream.readInt() != CLASS_MAGIC) {
  -            throw new ClassFormatError("No Magic Code Found - probably not a Java class file.");
  +            throw new ClassFormatError("No Magic Code Found " 
  +                + "- probably not a Java class file.");
           }
   
           // right we have a good looking class file.
  @@ -124,12 +113,16 @@
           int accessFlags = classStream.readUnsignedShort();
           int thisClassIndex = classStream.readUnsignedShort();
           int superClassIndex = classStream.readUnsignedShort();
  -        className = ((ClassCPInfo) constantPool.getEntry(thisClassIndex)).getClassName();
  +        ClassCPInfo classInfo 
  +            = (ClassCPInfo)constantPool.getEntry(thisClassIndex);
  +        className  = classInfo.getClassName();
       }
   
   
       /**
        * Get the classes which this class references.
  +     *
  +     * @return a vector of class names which this class references
        */
       public Vector getClassRefs() {
   
  @@ -138,7 +131,8 @@
           for (int i = 0; i < constantPool.size(); ++i) {
               ConstantPoolEntry entry = constantPool.getEntry(i);
   
  -            if (entry != null && entry.getTag() == ConstantPoolEntry.CONSTANT_Class) {
  +            if (entry != null 
  +                && entry.getTag() == ConstantPoolEntry.CONSTANT_CLASS) {
                   ClassCPInfo classEntry = (ClassCPInfo) entry;
   
                   if (!classEntry.getClassName().equals(className)) {
  
  
  
  1.5       +11 -1     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileIterator.java
  
  Index: ClassFileIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ClassFileIterator.java	8 Jan 2002 23:47:35 -0000	1.4
  +++ ClassFileIterator.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -53,8 +53,18 @@
    */
   package org.apache.tools.ant.taskdefs.optional.depend;
   
  -
  +/**
  + * Iterator interface for iterating over a set of class files
  + *
  + * @author <a href="mailto:conor@apache.org">Conor MacNeill</a>
  + */
   public interface ClassFileIterator {
   
  +    /**
  +     * Get the next class file in the iteration
  +     *
  +     * @return the next class file in the iterationr
  +     */
       ClassFile getNextClassFile();
   }
  +
  
  
  
  1.6       +7 -9      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java
  
  Index: ClassFileUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/ClassFileUtils.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- ClassFileUtils.java	8 Jan 2002 23:47:35 -0000	1.5
  +++ ClassFileUtils.java	3 Feb 2002 10:12:16 -0000	1.6
  @@ -54,13 +54,12 @@
   package org.apache.tools.ant.taskdefs.optional.depend;
   
   /**
  - * Utility class file routines.
  - *
  - * This class porovides a number of static utility methods to convert between the
  - * formats used in the Java class file format and those commonly used in Java
  - * programming.
  + * Utility class file routines. This class provides a number of static
  + * utility methods to convert between the formats used in the Java class
  + * file format and those commonly used in Java programming.
    *
    * @author Conor MacNeill
  + * 
    */
   public class ClassFileUtils {
   
  @@ -68,8 +67,7 @@
        * Convert a class name from class file slash notation to java source
        * file dot notation.
        *
  -     * @param slashName the class name in slash notation (eg. java/lang/Object)
  -     *
  +     * @param name the class name in slash notation org/apache/ant
        * @return the class name in dot notation (eg. java.lang.Object).
        */
       public static String convertSlashName(String name) {
  @@ -77,10 +75,10 @@
       }
   
       /**
  -     * Convert a class name from java source file dot notation to class file slash notation..
  +     * Convert a class name from java source file dot notation to class file
  +     * slash notation..
        *
        * @param dotName the class name in dot notation (eg. java.lang.Object).
  -     *
        * @return the class name in slash notation (eg. java/lang/Object).
        */
       public static String convertDotName(String dotName) {
  
  
  
  1.16      +154 -99   jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  
  Index: Depend.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -w -u -r1.15 -r1.16
  --- Depend.java	10 Jan 2002 13:59:35 -0000	1.15
  +++ Depend.java	3 Feb 2002 10:12:16 -0000	1.16
  @@ -51,7 +51,6 @@
    * information on the Apache Software Foundation, please see
    * <http://www.apache.org/>.
    */
  -
   package org.apache.tools.ant.taskdefs.optional.depend;
   
   import java.io.BufferedReader;
  @@ -74,7 +73,6 @@
   import org.apache.tools.ant.types.Path;
   import org.apache.tools.ant.types.Reference;
   
  -
   /**
    * Generate a dependency file for a given set of classes
    *
  @@ -83,79 +81,76 @@
   public class Depend extends MatchingTask {
       /**
        * A class (struct) user to manage information about a class
  +     *
  +     * @author <a href="mailto:conor@apache.org">Conor MacNeill</a>
        */
       private static class ClassFileInfo {
           /** The file where the class file is stored in the file system */
           public File absoluteFile;
   
  -        /** The location of the file relative to its base directory - the root
  -         of the package namespace */
  +        /**
  +         * The location of the file relative to its base directory - the
  +         * root of the package namespace
  +         */
           public String relativeName;
   
           /** The Java class name of this class */
           public String className;
       }
   
  -    /**
  -     * The path where source files exist
  -     */
  +    /** The path where source files exist */
       private Path srcPath;
   
  -    /**
  -     * The path where compiled class files exist.
  -     */
  +    /** The path where compiled class files exist. */
       private Path destPath;
   
  -    /**
  -     * The directory which contains the dependency cache.
  -     */
  +    /** The directory which contains the dependency cache. */
       private File cache;
   
       /**
  -     * A map which gives for every class a list of te class which it affects.
  +     * A map which gives for every class a list of te class which it
  +     * affects.
        */
       private Hashtable affectedClassMap;
   
  -    /**
  -     * A map which gives information about a class
  -     */
  +    /** A map which gives information about a class */
       private Hashtable classFileInfoMap;
   
       /**
  -     * A map which gives the list of jars and classes from the classpath that
  -     * a class depends upon
  +     * A map which gives the list of jars and classes from the classpath
  +     * that a class depends upon
        */
       private Hashtable classpathDependencies;
   
  -    /**
  -     * The list of classes which are out of date.
  -     */
  +    /** The list of classes which are out of date. */
       private Hashtable outOfDateClasses;
   
       /**
  -     * indicates that the dependency relationships should be extended
  -     * beyond direct dependencies to include all classes. So if A directly
  -     * affects B abd B directly affects C, then A indirectly affects C.
  +     * indicates that the dependency relationships should be extended beyond
  +     * direct dependencies to include all classes. So if A directly affects
  +     * B abd B directly affects C, then A indirectly affects C.
        */
       private boolean closure = false;
   
       /**
  -     * Flag which controls whether the reversed dependencies should be dumped
  -     * to the log
  +     * Flag which controls whether the reversed dependencies should be
  +     * dumped to the log
        */
       private boolean dump = false;
   
       /** The classpath to look for additional dependencies */
       private Path dependClasspath;
   
  -    /**
  -     * constants used with the cache file
  -     */
  +    /** constants used with the cache file */
       private final static String CACHE_FILE_NAME = "dependencies.txt";
  +    /** String Used to separate classnames in the dependency file */
       private final static String CLASSNAME_PREPEND = "||:";
   
       /**
        * Set the classpath to be used for this dependency check.
  +     *
  +     * @param classpath the classpath to be used when checking for
  +     *      dependencies on elements in the classpath
        */
       public void setClasspath(Path classpath) {
           if (dependClasspath == null) {
  @@ -165,13 +160,19 @@
           }
       }
   
  -    /** Gets the classpath to be used for this dependency check. */
  +    /**
  +     * Gets the classpath to be used for this dependency check.
  +     *
  +     * @return the current dependency classpath
  +     */
       public Path getClasspath() {
           return dependClasspath;
       }
   
       /**
        * Creates a nested classpath element.
  +     *
  +     * @return A path object to be configured by Ant
        */
       public Path createClasspath() {
           if (dependClasspath == null) {
  @@ -182,6 +183,9 @@
   
       /**
        * Adds a reference to a CLASSPATH defined elsewhere.
  +     *
  +     * @param r a reference to a path object to be used as the depend
  +     *      classpath
        */
       public void setClasspathRef(Reference r) {
           createClasspath().setRefid(r);
  @@ -189,6 +193,9 @@
   
       /**
        * Read the dependencies from cache file
  +     *
  +     * @return a collection of class dependencies
  +     * @exception IOException if the dependnecy file cannot be read
        */
       private Hashtable readCachedDependencies() throws IOException {
           Hashtable dependencyMap = new Hashtable();
  @@ -225,8 +232,12 @@
   
       /**
        * Write the dependencies to cache file
  +     *
  +     * @param dependencyMap the map of dependencies to be written out.
  +     * @exception IOException if the dependency file cannot be written out.
        */
  -    private void writeCachedDependencies(Hashtable dependencyMap) throws IOException {
  +    private void writeCachedDependencies(Hashtable dependencyMap)
  +         throws IOException {
           if (cache != null) {
               PrintWriter pw = null;
               try {
  @@ -234,12 +245,14 @@
                   File depFile = new File(cache, CACHE_FILE_NAME);
   
                   pw = new PrintWriter(new FileWriter(depFile));
  -                for (Enumeration deps = dependencyMap.keys(); deps.hasMoreElements();) {
  -                    String className = (String) deps.nextElement();
  +                Enumeration e = dependencyMap.keys();
  +                while (e.hasMoreElements()) {
  +                    String className = (String)e.nextElement();
   
                       pw.println(CLASSNAME_PREPEND + className);
   
  -                    Vector dependencyList = (Vector) dependencyMap.get(className);
  +                    Vector dependencyList
  +                         = (Vector)dependencyMap.get(className);
                       int size = dependencyList.size();
                       for (int x = 0; x < size; x++) {
                           pw.println(dependencyList.elementAt(x));
  @@ -255,10 +268,12 @@
   
   
       /**
  -     * Determine the dependencies between classes.
  +     * Determine the dependencies between classes. Class dependencies are
  +     * determined by examining the class references in a class file to other
  +     * classes
        *
  -     * Class dependencies are determined by examining the class references in a class file
  -     * to other classes
  +     * @exception IOException if either the dependnecies cache or the class
  +     *      files cannot be read or written
        */
       private void determineDependencies() throws IOException {
           affectedClassMap = new Hashtable();
  @@ -306,7 +321,6 @@
                           cacheDirty = true;
                           dependencyMap.put(info.className, dependencyList);
                       }
  -
                   } finally {
                       if (inFileStream != null) {
                           inFileStream.close();
  @@ -384,6 +398,12 @@
           }
       }
   
  +    /**
  +     * Delete all the class files which are out of date, by way of their
  +     * dependency on a class which is out of date
  +     *
  +     * @return the number of files deleted.
  +     */
       private int deleteAllAffectedFiles() {
           int count = 0;
           for (Enumeration e = outOfDateClasses.elements(); e.hasMoreElements();) {
  @@ -398,6 +418,13 @@
           return count;
       }
   
  +    /**
  +     * Delete all the class files of classes which depend on the given class
  +     *
  +     * @param className the name of the class whose dependent classes willbe
  +     *      deleted
  +     * @return the number of class files removed
  +     */
       private int deleteAffectedFiles(String className) {
           int count = 0;
   
  @@ -445,7 +472,7 @@
       /**
        * Does the work.
        *
  -     * @exception BuildException Thrown in unrecovrable error.
  +     * @exception BuildException Thrown in case of an unrecoverable error.
        */
       public void execute() throws BuildException {
           try {
  @@ -495,7 +522,6 @@
                           }
                       }
                   }
  -
               }
   
               // we now need to scan for out of date files. When we have the list
  @@ -547,8 +573,13 @@
       }
   
       /**
  -     * Scans the directory looking for source files that are newer than their class files.
  -     * The results are returned in the class variable compileList
  +     * Scans the directory looking for source files that are newer than
  +     * their class files. The results are returned in the class variable
  +     * compileList
  +     *
  +     * @param srcDir the source directory
  +     * @param files the names of the files in the source dir which are to be
  +     *      checked.
        */
       protected void scanDir(File srcDir, String files[]) {
   
  @@ -599,12 +630,16 @@
       }
   
       /**
  -     * Add the list of class files from the given directory to the
  -     * class file vector, including any subdirectories.
  +     * Add the list of class files from the given directory to the class
  +     * file vector, including any subdirectories.
        *
  -     * @param classLocations a path structure containing all the directories
  -     *                       where classes can be found.
  -     * @return a vector containing the classes to analyse.
  +     * @param classFileList a list of ClassFileInfo objects for all the
  +     *      files in the diretcort tree
  +     * @param dir tyhe directory tree to be searched, recursivley, for class
  +     *      files
  +     * @param root the root of the source tree. This is used to determine
  +     *      the absoluate class name from the relative position in the
  +     *      source tree
        */
       private void addClassFiles(Vector classFileList, File dir, File root) {
           String[] filesInDir = dir.list();
  @@ -631,6 +666,8 @@
   
       /**
        * Set the source dirs to find the source Java files.
  +     *
  +     * @param srcPath the source path
        */
       public void setSrcdir(Path srcPath) {
           this.srcPath = srcPath;
  @@ -638,21 +675,39 @@
   
       /**
        * Set the destination directory where the compiled java files exist.
  +     *
  +     * @param destPath the destination areas where build files are written
        */
       public void setDestDir(Path destPath) {
           this.destPath = destPath;
       }
   
  +    /**
  +     * Sets the dependency cache file
  +     *
  +     * @param cache the dependency cache file
  +     */
       public void setCache(File cache) {
           this.cache = cache;
       }
   
  +    /**
  +     * Set the closure flag. When not set, the depend task will only follow
  +     * direct dependencies between classes. When set, transitive
  +     * dependenecies are followed until the closure of the dependency set if
  +     * reached.
  +     *
  +     * @param closure indicate if dependency closure is required.
  +     */
       public void setClosure(boolean closure) {
           this.closure = closure;
       }
   
       /**
  -     * Flag to indicate whether the reverse dependency list should be dumped to debug
  +     * Flag to indicate whether the reverse dependency list should be dumped
  +     * to debug
  +     *
  +     * @param dump set to true to dump dependency information to the log
        */
       public void setDump(boolean dump) {
           this.dump = dump;
  
  
  
  1.6       +43 -38    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java
  
  Index: DirectoryIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/DirectoryIterator.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- DirectoryIterator.java	8 Jan 2002 23:47:35 -0000	1.5
  +++ DirectoryIterator.java	3 Feb 2002 10:12:16 -0000	1.6
  @@ -61,10 +61,9 @@
   import java.util.Vector;
   
   /**
  - * An iterator which iterates through the contents of a java directory.
  - *
  - * The iterator should be created with the directory at the root of the
  - * Java namespace.
  + * An iterator which iterates through the contents of a java directory. The
  + * iterator should be created with the directory at the root of the Java
  + * namespace.
    *
    * @author Conor MacNeill
    */
  @@ -78,32 +77,34 @@
   
       /**
        * The current directory iterator. As directories encounter lower level
  -     * directories, the current iterator is pushed onto the iterator
  -     * stack and a new iterator over the sub directory becomes the current
  -     * directory. This implements a depth first traversal of the directory namespace.
  +     * directories, the current iterator is pushed onto the iterator stack
  +     * and a new iterator over the sub directory becomes the current
  +     * directory. This implements a depth first traversal of the directory
  +     * namespace.
        */
       private Enumeration currentEnum;
   
       /**
  -     * The length of the root directory. This is used to remove the root directory
  -     * from full paths.
  +     * The length of the root directory. This is used to remove the root
  +     * directory from full paths.
        */
  -    int rootLength;
  +    private int rootLength;
   
       /**
  -     * Creates a directory iterator.
  -     *
  -     * The directory iterator is created to scan the root directory. If the
  -     * changeInto flag is given, then the entries returned will be relative to this
  -     * directory and not the current directory.
  -     *
  -     * @param rootDirectory the root if the directory namespace which is to be iterated over
  -     * @param changeInto if true then the returned entries will be relative to the rootDirectory
  -     * and not the current directory.
  -     *
  -     * @throws IOException if there is a problem reading the directory information.
  +     * Creates a directory iterator. The directory iterator is created to
  +     * scan the root directory. If the changeInto flag is given, then the
  +     * entries returned will be relative to this directory and not the
  +     * current directory.
  +     *
  +     * @param rootDirectory the root if the directory namespace which is to
  +     *      be iterated over
  +     * @param changeInto if true then the returned entries will be relative
  +     *      to the rootDirectory and not the current directory.
  +     * @exception IOException if there is a problem reading the directory
  +     *      information.
        */
  -    public DirectoryIterator(File rootDirectory, boolean changeInto) throws IOException {
  +    public DirectoryIterator(File rootDirectory, boolean changeInto)
  +         throws IOException {
           super();
   
           enumStack = new Stack();
  @@ -120,11 +121,12 @@
       }
   
       /**
  -     * Get a vector covering all the entries (files and subdirectories in a directory).
  +     * Get a vector covering all the entries (files and subdirectories in a
  +     * directory).
        *
        * @param directory the directory to be scanned.
  -     *
  -     * @return a vector containing File objects for each entry in the directory.
  +     * @return a vector containing File objects for each entry in the
  +     *      directory.
        */
       private Vector getDirectoryEntries(File directory) {
           Vector files = new Vector();
  @@ -144,15 +146,16 @@
       }
   
       /**
  -     * Template method to allow subclasses to supply elements for the iteration.
  -     *
  -     * The directory iterator maintains a stack of iterators covering each level
  -     * in the directory hierarchy. The current iterator covers the current directory
  -     * being scanned. If the next entry in that directory is a subdirectory, the current
  -     * iterator is pushed onto the stack and a new iterator is created for the
  -     * subdirectory. If the entry is a file, it is returned as the next element and the
  -     * iterator remains valid. If there are no more entries in the current directory,
  -     * the topmost iterator on the statck is popped off to become the current iterator.
  +     * Template method to allow subclasses to supply elements for the
  +     * iteration. The directory iterator maintains a stack of iterators
  +     * covering each level in the directory hierarchy. The current iterator
  +     * covers the current directory being scanned. If the next entry in that
  +     * directory is a subdirectory, the current iterator is pushed onto the
  +     * stack and a new iterator is created for the subdirectory. If the
  +     * entry is a file, it is returned as the next element and the iterator
  +     * remains valid. If there are no more entries in the current directory,
  +     * the topmost iterator on the statck is popped off to become the
  +     * current iterator.
        *
        * @return the next ClassFile in the iteration.
        */
  @@ -176,11 +179,13 @@
                       } else {
   
                           // we have a file. create a stream for it
  -                        FileInputStream inFileStream = new FileInputStream(element);
  +                        FileInputStream inFileStream 
  +                            = new FileInputStream(element);
   
                           if (element.getName().endsWith(".class")) {
   
  -                            // create a data input stream from the jar input stream
  +                            // create a data input stream from the jar 
  +                            // input stream
                               ClassFile javaClass = new ClassFile();
   
                               javaClass.read(inFileStream);
  
  
  
  1.5       +21 -2     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/JarFileIterator.java
  
  Index: JarFileIterator.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/JarFileIterator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- JarFileIterator.java	8 Jan 2002 23:47:35 -0000	1.4
  +++ JarFileIterator.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -60,19 +60,34 @@
   import java.util.zip.ZipInputStream;
   
   /**
  - * A class file iterator which iterates through the contents of a Java jar file.
  + * A class file iterator which iterates through the contents of a Java jar
  + * file.
    *
    * @author Conor MacNeill
    */
   public class JarFileIterator implements ClassFileIterator {
  +    /** The jar stream from the jar file being iterated over*/
       private ZipInputStream jarStream;
   
  +    /**
  +     * Construct a iterartor over a jar stream
  +     *
  +     * @param stream the basic input stream from which the Jar is recived
  +     * @exception IOException if the jar stream connot be created
  +     */
       public JarFileIterator(InputStream stream) throws IOException {
           super();
   
           jarStream = new ZipInputStream(stream);
       }
   
  +    /**
  +     * Read a stream into an array of bytes
  +     *
  +     * @param stream the stream from which the bytes are read
  +     * @return the stream's content as a byte array
  +     * @exception IOException if the stream cannot be read
  +     */
       private byte[] getEntryBytes(InputStream stream) throws IOException {
           byte[] buffer = new byte[8192];
           ByteArrayOutputStream baos = new ByteArrayOutputStream(2048);
  @@ -85,13 +100,17 @@
           return baos.toByteArray();
       }
   
  +    /**
  +     * Get the next ClassFile object from the jar
  +     *
  +     * @return a ClassFile object describing the class from the jar
  +     */
       public ClassFile getNextClassFile() {
           ZipEntry jarEntry;
           ClassFile nextElement = null;
   
           try {
               jarEntry = jarStream.getNextEntry();
  -
   
               while (nextElement == null && jarEntry != null) {
                   String entryName = jarEntry.getName();
  
  
  
  1.5       +16 -15    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ClassCPInfo.java
  
  Index: ClassCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ClassCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ClassCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ ClassCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,7 +56,6 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
    * The constant pool entry which stores class information.
    *
  @@ -65,33 +64,32 @@
   public class ClassCPInfo extends ConstantPoolEntry {
   
       /**
  -     * The class' name. This will be only valid if the entry has been resolved
  -     * against the constant pool.
  +     * The class' name. This will be only valid if the entry has been
  +     * resolved against the constant pool.
        */
       private String className;
   
       /**
  -     * The index into the constant pool where this class' name is stored. If the class
  -     * name is changed, this entry is invalid until this entry is connected to a constant
  -     * pool.
  +     * The index into the constant pool where this class' name is stored. If
  +     * the class name is changed, this entry is invalid until this entry is
  +     * connected to a constant pool.
        */
       private int index;
   
       /**
  -     * Constructor.
  -     *
  -     * Sets the tag value for this entry to type Class
  +     * Constructor. Sets the tag value for this entry to type Class
        */
       public ClassCPInfo() {
  -        super(CONSTANT_Class, 1);
  +        super(CONSTANT_CLASS, 1);
       }
   
       /**
        * Read the entry from a stream.
        *
  -     * @param cpStream the stream containing the constant pool entry to be read.
  -     *
  -     * @exception IOException thrown if there is a problem reading the entry from the stream.
  +     * @param cpStream the stream containing the constant pool entry to be
  +     *      read.
  +     * @exception IOException thrown if there is a problem reading the entry
  +     *      from the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           index = cpStream.readUnsignedShort();
  @@ -100,6 +98,8 @@
   
       /**
        * Generate a string readable version of this entry
  +     *
  +     * @return string representation of this constant pool entry
        */
       public String toString() {
           return "Class Constant Pool Entry for " + className + "[" + index + "]";
  @@ -108,7 +108,8 @@
       /**
        * Resolve this class info against the given constant pool.
        *
  -     * @param constantPool the constant pool with which to resolve the class.
  +     * @param constantPool the constant pool with which to resolve the
  +     *      class.
        */
       public void resolve(ConstantPool constantPool) {
           className = ((Utf8CPInfo) constantPool.getEntry(index)).getValue();
  
  
  
  1.6       +5 -7      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantCPInfo.java
  
  Index: ConstantCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantCPInfo.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -w -u -r1.5 -r1.6
  --- ConstantCPInfo.java	26 Jan 2002 21:03:28 -0000	1.5
  +++ ConstantCPInfo.java	3 Feb 2002 10:12:16 -0000	1.6
  @@ -53,20 +53,17 @@
    */
   package org.apache.tools.ant.taskdefs.optional.depend.constantpool;
   
  -
   /**
    * A Constant Pool entry which represents a constant value.
    *
  - *
    * @author Conor MacNeill
    */
   public abstract class ConstantCPInfo extends ConstantPoolEntry {
   
       /**
  -     * The entry's untyped value.
  -     *
  -     * Each subclass interprets the constant value based on the subclass's type.
  -     * The value here must be compatible.
  +     * The entry's untyped value. Each subclass interprets the constant
  +     * value based on the subclass's type. The value here must be
  +     * compatible.
        */
       private Object value;
   
  @@ -74,7 +71,8 @@
        * Initialise the constant entry.
        *
        * @param tagValue the constant pool entry type to be used.
  -     * @param entries the number of constant pool entry slots occupied by this entry.
  +     * @param entries the number of constant pool entry slots occupied by
  +     *      this entry.
        */
       protected ConstantCPInfo(int tagValue, int entries) {
           super(tagValue, entries);
  
  
  
  1.5       +77 -73    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java
  
  Index: ConstantPool.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPool.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ConstantPool.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ ConstantPool.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -60,30 +60,26 @@
   import java.util.Vector;
   
   /**
  - * The constant pool of a Java class.
  - *
  - * The constant pool is a collection of constants used in a Java class file. It stores
  - * strings, constant values, class names, method names, field names etc.
  - *
  - * @see <a href="http://java.sun.com/docs/books/vmspec/">The Java Virtual Machine Specification</a>
  + * The constant pool of a Java class. The constant pool is a collection of
  + * constants used in a Java class file. It stores strings, constant values,
  + * class names, method names, field names etc.
    *
    * @author Conor MacNeill
  + * @see <a href="http://java.sun.com/docs/books/vmspec/">The Java Virtual
  + *      Machine Specification</a>
    */
   public class ConstantPool {
   
  -    /**
  -     * The entries in the constant pool.
  -     */
  +    /** The entries in the constant pool. */
       private Vector entries;
   
       /**
  -     * A Hashtable of UTF8 entries - used to get constant pool indexes of the UTF8 values quickly
  +     * A Hashtable of UTF8 entries - used to get constant pool indexes of
  +     * the UTF8 values quickly
        */
       private Hashtable utf8Indexes;
   
  -    /**
  -     * Initialise the constant pool.
  -     */
  +    /** Initialise the constant pool. */
       public ConstantPool() {
           entries = new Vector();
   
  @@ -98,15 +94,15 @@
        * Read the constant pool from a class input stream.
        *
        * @param classStream the DataInputStream of a class file.
  -     *
  -     * @throws IOException if there is a problem reading the constant pool
  +     * @exception IOException if there is a problem reading the constant pool
        * from the stream
        */
       public void read(DataInputStream classStream) throws IOException {
           int numEntries = classStream.readUnsignedShort();
   
           for (int i = 1; i < numEntries;) {
  -            ConstantPoolEntry nextEntry = ConstantPoolEntry.readEntry(classStream);
  +            ConstantPoolEntry nextEntry
  +                 = ConstantPoolEntry.readEntry(classStream);
   
               i += nextEntry.getNumEntries();
   
  @@ -116,6 +112,8 @@
   
       /**
        * Get the size of the constant pool.
  +     *
  +     * @return the size of the constant pool
        */
       public int size() {
           return entries.size();
  @@ -125,8 +123,8 @@
        * Add an entry to the constant pool.
        *
        * @param entry the new entry to be added to the constant pool.
  -     *
  -     * @return the index into the constant pool at which the entry is stored.
  +     * @return the index into the constant pool at which the entry is
  +     *      stored.
        */
       public int addEntry(ConstantPoolEntry entry) {
           int index = entries.size();
  @@ -150,10 +148,9 @@
       }
   
       /**
  -     * Resolve the entries in the constant pool.
  -     *
  -     * Resolution of the constant pool involves transforming indexes to
  -     * other constant pool entries into the actual data for that entry.
  +     * Resolve the entries in the constant pool. Resolution of the constant
  +     * pool involves transforming indexes to other constant pool entries
  +     * into the actual data for that entry.
        */
       public void resolve() {
           for (Enumeration i = entries.elements(); i.hasMoreElements();) {
  @@ -170,7 +167,6 @@
        * Get an constant pool entry at a particular index.
        *
        * @param index the index into the constant pool.
  -     *
        * @return the constant pool entry at that index.
        */
       public ConstantPoolEntry getEntry(int index) {
  @@ -181,9 +177,8 @@
        * Get the index of a given UTF8 constant pool entry.
        *
        * @param value the string value of the UTF8 entry.
  -     *
  -     * @return the index at which the given string occurs in the
  -     * constant pool or -1 if the value does not occur.
  +     * @return the index at which the given string occurs in the constant
  +     *      pool or -1 if the value does not occur.
        */
       public int getUTF8Entry(String value) {
           int index = -1;
  @@ -197,10 +192,10 @@
       }
   
       /**
  -     * Get the index of a given CONSTANT_Class entry in the constant pool.
  -     *
  -     * @param className the name of the class for which the class entry index is required.
  +     * Get the index of a given CONSTANT_CLASS entry in the constant pool.
        *
  +     * @param className the name of the class for which the class entry
  +     *      index is required.
        * @return the index at which the given class entry occurs in the
        * constant pool or -1 if the value does not occur.
        */
  @@ -225,8 +220,8 @@
       /**
        * Get the index of a given constant value entry in the constant pool.
        *
  -     * @param constantValue the constant value for which the index is required.
  -     *
  +     * @param constantValue the constant value for which the index is
  +     *      required.
        * @return the index at which the given value entry occurs in the
        * constant pool or -1 if the value does not occur.
        */
  @@ -249,17 +244,18 @@
       }
   
       /**
  -     * Get the index of a given CONSTANT_MethodRef entry in the constant pool.
  +     * Get the index of a given CONSTANT_METHODREF entry in the constant
  +     * pool.
        *
  -     * @param methodClassName the name of the class which contains the method
  -     * being referenced.
  +     * @param methodClassName the name of the class which contains the
  +     *      method being referenced.
        * @param methodName the name of the method being referenced.
        * @param methodType the type descriptor of the metho dbeing referenced.
  -     *
        * @return the index at which the given method ref entry occurs in the
        * constant pool or -1 if the value does not occur.
        */
  -    public int getMethodRefEntry(String methodClassName, String methodName, String methodType) {
  +    public int getMethodRefEntry(String methodClassName, String methodName,
  +                                 String methodType) {
           int index = -1;
   
           for (int i = 0; i < entries.size() && index == -1; ++i) {
  @@ -269,7 +265,8 @@
                   MethodRefCPInfo methodRefEntry = (MethodRefCPInfo) element;
   
                   if (methodRefEntry.getMethodClassName().equals(methodClassName)
  -                        && methodRefEntry.getMethodName().equals(methodName) && methodRefEntry.getMethodType().equals(methodType)) {
  +                     && methodRefEntry.getMethodName().equals(methodName)
  +                     && methodRefEntry.getMethodType().equals(methodType)) {
                       index = i;
                   }
               }
  @@ -279,24 +276,28 @@
       }
   
       /**
  -     * Get the index of a given CONSTANT_InterfaceMethodRef entry in the constant pool.
  +     * Get the index of a given CONSTANT_INTERFACEMETHODREF entry in the
  +     * constant pool.
        *
  -     * @param interfaceMethodClassName the name of the interface which contains the method
  -     * being referenced.
  +     * @param interfaceMethodClassName the name of the interface which
  +     *      contains the method being referenced.
        * @param interfaceMethodName the name of the method being referenced.
  -     * @param interfaceMethodType the type descriptor of the metho dbeing referenced.
  -     *
  +     * @param interfaceMethodType the type descriptor of the metho dbeing
  +     *      referenced.
        * @return the index at which the given method ref entry occurs in the
        * constant pool or -1 if the value does not occur.
        */
  -    public int getInterfaceMethodRefEntry(String interfaceMethodClassName, String interfaceMethodName, String interfaceMethodType) {
  +    public int getInterfaceMethodRefEntry(String interfaceMethodClassName,
  +                                          String interfaceMethodName,
  +                                          String interfaceMethodType) {
           int index = -1;
   
           for (int i = 0; i < entries.size() && index == -1; ++i) {
               Object element = entries.elementAt(i);
   
               if (element instanceof InterfaceMethodRefCPInfo) {
  -                InterfaceMethodRefCPInfo interfaceMethodRefEntry = (InterfaceMethodRefCPInfo) element;
  +                InterfaceMethodRefCPInfo interfaceMethodRefEntry
  +                     = (InterfaceMethodRefCPInfo)element;
   
                   if (interfaceMethodRefEntry.getInterfaceMethodClassName().equals(interfaceMethodClassName)
                           && interfaceMethodRefEntry.getInterfaceMethodName().equals(interfaceMethodName)
  @@ -310,17 +311,18 @@
       }
   
       /**
  -     * Get the index of a given CONSTANT_FieldRef entry in the constant pool.
  +     * Get the index of a given CONSTANT_FIELDREF entry in the constant
  +     * pool.
        *
        * @param fieldClassName the name of the class which contains the field
        * being referenced.
        * @param fieldName the name of the field being referenced.
        * @param fieldType the type descriptor of the field being referenced.
  -     *
        * @return the index at which the given field ref entry occurs in the
        * constant pool or -1 if the value does not occur.
        */
  -    public int getFieldRefEntry(String fieldClassName, String fieldName, String fieldType) {
  +    public int getFieldRefEntry(String fieldClassName, String fieldName,
  +                                String fieldType) {
           int index = -1;
   
           for (int i = 0; i < entries.size() && index == -1; ++i) {
  @@ -329,7 +331,8 @@
               if (element instanceof FieldRefCPInfo) {
                   FieldRefCPInfo fieldRefEntry = (FieldRefCPInfo) element;
   
  -                if (fieldRefEntry.getFieldClassName().equals(fieldClassName) && fieldRefEntry.getFieldName().equals(fieldName)
  +                if (fieldRefEntry.getFieldClassName().equals(fieldClassName)
  +                     && fieldRefEntry.getFieldName().equals(fieldName)
                           && fieldRefEntry.getFieldType().equals(fieldType)) {
                       index = i;
                   }
  @@ -340,11 +343,11 @@
       }
   
       /**
  -     * Get the index of a given CONSTANT_NameAndType entry in the constant pool.
  +     * Get the index of a given CONSTANT_NAMEANDTYPE entry in the constant
  +     * pool.
        *
        * @param name the name
        * @param type the type
  -     *
        * @return the index at which the given NameAndType entry occurs in the
        * constant pool or -1 if the value does not occur.
        */
  @@ -357,7 +360,8 @@
               if (element instanceof NameAndTypeCPInfo) {
                   NameAndTypeCPInfo nameAndTypeEntry = (NameAndTypeCPInfo) element;
   
  -                if (nameAndTypeEntry.getName().equals(name) && nameAndTypeEntry.getType().equals(type)) {
  +                if (nameAndTypeEntry.getName().equals(name)
  +                     && nameAndTypeEntry.getType().equals(type)) {
                       index = i;
                   }
               }
  
  
  
  1.5       +67 -99    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPoolEntry.java
  
  Index: ConstantPoolEntry.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/ConstantPoolEntry.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- ConstantPoolEntry.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ ConstantPoolEntry.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,75 +56,52 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
  - * An entry in the constant pool.
  - *
  - * This class contains a represenation of the constant pool entries. It is
  - * an abstract base class for all the different forms of constant pool entry.
  + * An entry in the constant pool. This class contains a represenation of the
  + * constant pool entries. It is an abstract base class for all the different
  + * forms of constant pool entry.
    *
    * @author Conor MacNeill
    * @see ConstantPool
    */
   public abstract class ConstantPoolEntry {
   
  -    /**
  -     * Tag value for UTF8 entries.
  -     */
  -    public final static int CONSTANT_Utf8 = 1;
  +    /** Tag value for UTF8 entries. */
  +    public final static int CONSTANT_UTF8 = 1;
   
  -    /**
  -     * Tag value for Integer entries.
  -     */
  -    public final static int CONSTANT_Integer = 3;
  +    /** Tag value for Integer entries. */
  +    public final static int CONSTANT_INTEGER = 3;
   
  -    /**
  -     * Tag value for Float entries.
  -     */
  -    public final static int CONSTANT_Float = 4;
  +    /** Tag value for Float entries. */
  +    public final static int CONSTANT_FLOAT = 4;
   
  -    /**
  -     * Tag value for Long entries.
  -     */
  -    public final static int CONSTANT_Long = 5;
  +    /** Tag value for Long entries. */
  +    public final static int CONSTANT_LONG = 5;
   
  -    /**
  -     * Tag value for Double entries.
  -     */
  -    public final static int CONSTANT_Double = 6;
  +    /** Tag value for Double entries. */
  +    public final static int CONSTANT_DOUBLE = 6;
   
  -    /**
  -     * Tag value for Class entries.
  -     */
  -    public final static int CONSTANT_Class = 7;
  +    /** Tag value for Class entries. */
  +    public final static int CONSTANT_CLASS = 7;
   
  -    /**
  -     * Tag value for String entries.
  -     */
  -    public final static int CONSTANT_String = 8;
  +    /** Tag value for String entries. */
  +    public final static int CONSTANT_STRING = 8;
   
  -    /**
  -     * Tag value for Field Reference entries.
  -     */
  -    public final static int CONSTANT_FieldRef = 9;
  +    /** Tag value for Field Reference entries. */
  +    public final static int CONSTANT_FIELDREF = 9;
   
  -    /**
  -     * Tag value for Method Reference entries.
  -     */
  -    public final static int CONSTANT_MethodRef = 10;
  +    /** Tag value for Method Reference entries. */
  +    public final static int CONSTANT_METHODREF = 10;
   
  -    /**
  -     * Tag value for Interface Method Reference entries.
  -     */
  -    public final static int CONSTANT_InterfaceMethodRef = 11;
  +    /** Tag value for Interface Method Reference entries. */
  +    public final static int CONSTANT_INTERFACEMETHODREF = 11;
   
  -    /**
  -     * Tag value for Name and Type entries.
  -     */
  -    public final static int CONSTANT_NameAndType = 12;
  +    /** Tag value for Name and Type entries. */
  +    public final static int CONSTANT_NAMEANDTYPE = 12;
   
       /**
  -     * This entry's tag which identifies the type of this constant pool entry.
  +     * This entry's tag which identifies the type of this constant pool
  +     * entry.
        */
       private int tag;
   
  @@ -141,8 +118,10 @@
       /**
        * Initialse the constant pool entry.
        *
  -     * @param tagValue the tag value which identifies which type of constant pool entry this is.
  -     * @param entries the number of constant pool entry slots this entry occupies.
  +     * @param tagValue the tag value which identifies which type of constant
  +     *      pool entry this is.
  +     * @param entries the number of constant pool entry slots this entry
  +     *      occupies.
        */
       public ConstantPoolEntry(int tagValue, int entries) {
           tag = tagValue;
  @@ -151,82 +130,71 @@
       }
   
       /**
  -     * Read a constant pool entry from a stream.
  -     *
  -     * This is a factory method which reads a constant pool entry
  -     * form a stream and returns the appropriate subclass for the
  -     * entry.
  -     *
  -     * @param cpStream the stream from which the constant pool entry is to be read.
  -     *
  -     * @returns the appropriate ConstantPoolEntry subclass representing the
  +     * Read a constant pool entry from a stream. This is a factory method
  +     * which reads a constant pool entry form a stream and returns the
  +     * appropriate subclass for the entry.
  +     *
  +     * @param cpStream the stream from which the constant pool entry is to
  +     *      be read.
  +     * @return the appropriate ConstantPoolEntry subclass representing the
        * constant pool entry from the stream.
  -     *
  -     * @throws IOExcception if there is a problem reading the entry from the stream.
  +     * @exception IOException if the constant pool entry cannot be read 
  +     *      from the stream
        */
  -    public static ConstantPoolEntry readEntry(DataInputStream cpStream) throws IOException {
  +    public static ConstantPoolEntry readEntry(DataInputStream cpStream)
  +         throws IOException {
           ConstantPoolEntry cpInfo = null;
           int cpTag = cpStream.readUnsignedByte();
   
           switch (cpTag) {
   
  -            case CONSTANT_Utf8:
  +            case CONSTANT_UTF8:
                   cpInfo = new Utf8CPInfo();
   
                   break;
  -
  -            case CONSTANT_Integer:
  +            case CONSTANT_INTEGER:
                   cpInfo = new IntegerCPInfo();
   
                   break;
  -
  -            case CONSTANT_Float:
  +            case CONSTANT_FLOAT:
                   cpInfo = new FloatCPInfo();
   
                   break;
  -
  -            case CONSTANT_Long:
  +            case CONSTANT_LONG:
                   cpInfo = new LongCPInfo();
   
                   break;
  -
  -            case CONSTANT_Double:
  +            case CONSTANT_DOUBLE:
                   cpInfo = new DoubleCPInfo();
   
                   break;
  -
  -            case CONSTANT_Class:
  +            case CONSTANT_CLASS:
                   cpInfo = new ClassCPInfo();
   
                   break;
  -
  -            case CONSTANT_String:
  +            case CONSTANT_STRING:
                   cpInfo = new StringCPInfo();
   
                   break;
  -
  -            case CONSTANT_FieldRef:
  +            case CONSTANT_FIELDREF:
                   cpInfo = new FieldRefCPInfo();
   
                   break;
  -
  -            case CONSTANT_MethodRef:
  +            case CONSTANT_METHODREF:
                   cpInfo = new MethodRefCPInfo();
   
                   break;
  -
  -            case CONSTANT_InterfaceMethodRef:
  +            case CONSTANT_INTERFACEMETHODREF:
                   cpInfo = new InterfaceMethodRefCPInfo();
   
                   break;
  -
  -            case CONSTANT_NameAndType:
  +            case CONSTANT_NAMEANDTYPE:
                   cpInfo = new NameAndTypeCPInfo();
   
                   break;
  -
               default:
  -                throw new ClassFormatError("Invalid Constant Pool entry Type " + cpTag);
  +                throw new ClassFormatError("Invalid Constant Pool entry Type "
  +                     + cpTag);
           }
   
           cpInfo.read(cpStream);
  @@ -235,11 +203,10 @@
       }
   
       /**
  -     * Indicates whether this entry has been resolved.
  -     *
  -     * In general a constant pool entry can reference another constant
  -     * pool entry by its index value. Resolution involves replacing this
  -     * index value with the constant pool entry at that index.
  +     * Indicates whether this entry has been resolved. In general a constant
  +     * pool entry can reference another constant pool entry by its index
  +     * value. Resolution involves replacing this index value with the
  +     * constant pool entry at that index.
        *
        * @return true if this entry has been resolved.
        */
  @@ -261,9 +228,10 @@
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public abstract void read(DataInputStream cpStream) throws IOException;
   
  @@ -277,10 +245,10 @@
       }
   
       /**
  -     * Get the number of Constant Pool Entry slots within the constant pool occupied by this entry.
  +     * Get the number of Constant Pool Entry slots within the constant pool
  +     * occupied by this entry.
        *
        * @return the number of slots used.
  -     *
        */
       public final int getNumEntries() {
           return numEntries;
  
  
  
  1.5       +10 -6     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/DoubleCPInfo.java
  
  Index: DoubleCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/DoubleCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- DoubleCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ DoubleCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,23 +56,27 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
  - * The constant pool entry subclass used to represent double constant values.
  + * The constant pool entry subclass used to represent double constant
  + * values.
    *
    * @author Conor MacNeill
    */
   public class DoubleCPInfo extends ConstantCPInfo {
  +    /** 
  +     * Constructor
  +     */
       public DoubleCPInfo() {
  -        super(CONSTANT_Double, 2);
  +        super(CONSTANT_DOUBLE, 2);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from the
  +     *      stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           setValue(new Double(cpStream.readDouble()));
  
  
  
  1.5       +34 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/FieldRefCPInfo.java
  
  Index: FieldRefCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/FieldRefCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- FieldRefCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ FieldRefCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,33 +56,35 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
    * A FieldRef CP Info
    *
    * @author Conor MacNeill
    */
   public class FieldRefCPInfo extends ConstantPoolEntry {
  +    /** Name of the field's class */
       private String fieldClassName;
  +    /** name of the field in that class */
       private String fieldName;
  +    /** The type of the field */
       private String fieldType;
  +    /** Index into the constant pool for the class */
       private int classIndex;
  +    /** Index into the constant pool for the name and type entry */
       private int nameAndTypeIndex;
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor.  */
       public FieldRefCPInfo() {
  -        super(CONSTANT_FieldRef, 1);
  +        super(CONSTANT_FIELDREF, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           classIndex = cpStream.readUnsignedShort();
  @@ -103,7 +105,8 @@
   
           fieldClassName = fieldClass.getClassName();
   
  -        NameAndTypeCPInfo nt = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);
  +        NameAndTypeCPInfo nt 
  +            = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
   
           nt.resolve(constantPool);
   
  @@ -122,22 +125,39 @@
           String value;
   
           if (isResolved()) {
  -            value = "Field : Class = " + fieldClassName + ", name = " + fieldName + ", type = " + fieldType;
  +            value = "Field : Class = " + fieldClassName + ", name = " 
  +                + fieldName + ", type = " + fieldType;
           } else {
  -            value = "Field : Class index = " + classIndex + ", name and type index = " + nameAndTypeIndex;
  +            value = "Field : Class index = " + classIndex 
  +                + ", name and type index = " + nameAndTypeIndex;
           }
   
           return value;
       }
   
  +    /**
  +     * Gets the name of the class definint the field
  +     *
  +     * @return the name of the class definint the field
  +     */
       public String getFieldClassName() {
           return fieldClassName;
       }
   
  +    /**
  +     * Get the name of the field
  +     *
  +     * @return the field's name
  +     */
       public String getFieldName() {
           return fieldName;
       }
   
  +    /**
  +     * Get the type of the field
  +     *
  +     * @return the field's type in string format
  +     */
       public String getFieldType() {
           return fieldType;
       }
  
  
  
  1.5       +6 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/FloatCPInfo.java
  
  Index: FloatCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/FloatCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- FloatCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ FloatCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -63,20 +63,18 @@
    */
   public class FloatCPInfo extends ConstantCPInfo {
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor.  */
       public FloatCPInfo() {
  -        super(CONSTANT_Float, 1);
  +        super(CONSTANT_FLOAT, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           setValue(new Float(cpStream.readFloat()));
  
  
  
  1.5       +6 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/IntegerCPInfo.java
  
  Index: IntegerCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/IntegerCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- IntegerCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ IntegerCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -63,20 +63,18 @@
    */
   public class IntegerCPInfo extends ConstantCPInfo {
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor.  */
       public IntegerCPInfo() {
  -        super(CONSTANT_Integer, 1);
  +        super(CONSTANT_INTEGER, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           setValue(new Integer(cpStream.readInt()));
  
  
  
  1.5       +42 -16    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/InterfaceMethodRefCPInfo.java
  
  Index: InterfaceMethodRefCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/InterfaceMethodRefCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- InterfaceMethodRefCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ InterfaceMethodRefCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,34 +56,41 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
    * A InterfaceMethodRef CP Info
    *
  - *
    * @author Conor MacNeill
    */
   public class InterfaceMethodRefCPInfo extends ConstantPoolEntry {
  +    /** the class name of the class defining the interafce method */
       private String interfaceMethodClassName;
  +    /** the name of the interface nmethod */
       private String interfaceMethodName;
  +    /** the method signature of the interface method */
       private String interfaceMethodType;
  +    /**
  +     * the index into the constant pool of the class entry for the interface
  +     * class
  +     */
       private int classIndex;
  -    private int nameAndTypeIndex;
  -
       /**
  -     * Constructor.
  -     *
  +     * the index into the constant pool of the name and type entry
  +     * describing the method
        */
  +    private int nameAndTypeIndex;
  +
  +    /** Constructor. */
       public InterfaceMethodRefCPInfo() {
  -        super(CONSTANT_InterfaceMethodRef, 1);
  +        super(CONSTANT_INTERFACEMETHODREF, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           classIndex = cpStream.readUnsignedShort();
  @@ -98,13 +105,15 @@
        * and against which this entry is to be resolved.
        */
       public void resolve(ConstantPool constantPool) {
  -        ClassCPInfo interfaceMethodClass = (ClassCPInfo) constantPool.getEntry(classIndex);
  +        ClassCPInfo interfaceMethodClass
  +             = (ClassCPInfo)constantPool.getEntry(classIndex);
   
           interfaceMethodClass.resolve(constantPool);
   
           interfaceMethodClassName = interfaceMethodClass.getClassName();
   
  -        NameAndTypeCPInfo nt = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);
  +        NameAndTypeCPInfo nt
  +             = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
   
           nt.resolve(constantPool);
   
  @@ -123,23 +132,40 @@
           String value;
   
           if (isResolved()) {
  -            value = "InterfaceMethod : Class = " + interfaceMethodClassName + ", name = " + interfaceMethodName + ", type = "
  +            value = "InterfaceMethod : Class = " + interfaceMethodClassName
  +                 + ", name = " + interfaceMethodName + ", type = "
                       + interfaceMethodType;
           } else {
  -            value = "InterfaceMethod : Class index = " + classIndex + ", name and type index = " + nameAndTypeIndex;
  +            value = "InterfaceMethod : Class index = " + classIndex
  +                 + ", name and type index = " + nameAndTypeIndex;
           }
   
           return value;
       }
   
  +    /**
  +     * Gets the name of the class defining the interface method
  +     *
  +     * @return the name of the class defining the interface method
  +     */
       public String getInterfaceMethodClassName() {
           return interfaceMethodClassName;
       }
   
  +    /**
  +     * Get the name of the interface method
  +     *
  +     * @return the name of the interface method
  +     */
       public String getInterfaceMethodName() {
           return interfaceMethodName;
       }
   
  +    /**
  +     * Gets the type of the interface method
  +     *
  +     * @return the interface method's type signature
  +     */
       public String getInterfaceMethodType() {
           return interfaceMethodType;
       }
  
  
  
  1.5       +6 -8      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/LongCPInfo.java
  
  Index: LongCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/LongCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- LongCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ LongCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -63,20 +63,18 @@
    */
   public class LongCPInfo extends ConstantCPInfo {
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor.  */
       public LongCPInfo() {
  -        super(CONSTANT_Long, 2);
  +        super(CONSTANT_LONG, 2);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           setValue(new Long(cpStream.readLong()));
  
  
  
  1.5       +38 -14    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodRefCPInfo.java
  
  Index: MethodRefCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/MethodRefCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- MethodRefCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ MethodRefCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,33 +56,38 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
    * A MethodRef CP Info
    *
    * @author Conor MacNeill
    */
   public class MethodRefCPInfo extends ConstantPoolEntry {
  +    /** the name of the class defining this method */
       private String methodClassName;
  +    /** the name of the method */
       private String methodName;
  +    /** the method's type descriptor */
       private String methodType;
  +    /** The index into the constant pool which defines the class of this method. */
       private int classIndex;
  -    private int nameAndTypeIndex;
  -
       /**
  -     * Constructor.
  -     *
  +     * the index into the constant pool which defined the name and type
  +     * signature of the method
        */
  +    private int nameAndTypeIndex;
  +
  +    /** Constructor. */
       public MethodRefCPInfo() {
  -        super(CONSTANT_MethodRef, 1);
  +        super(CONSTANT_METHODREF, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           classIndex = cpStream.readUnsignedShort();
  @@ -98,9 +103,11 @@
           String value;
   
           if (isResolved()) {
  -            value = "Method : Class = " + methodClassName + ", name = " + methodName + ", type = " + methodType;
  +            value = "Method : Class = " + methodClassName + ", name = "
  +                 + methodName + ", type = " + methodType;
           } else {
  -            value = "Method : Class index = " + classIndex + ", name and type index = " + nameAndTypeIndex;
  +            value = "Method : Class index = " + classIndex
  +                 + ", name and type index = " + nameAndTypeIndex;
           }
   
           return value;
  @@ -114,13 +121,15 @@
        * and against which this entry is to be resolved.
        */
       public void resolve(ConstantPool constantPool) {
  -        ClassCPInfo methodClass = (ClassCPInfo) constantPool.getEntry(classIndex);
  +        ClassCPInfo methodClass
  +             = (ClassCPInfo)constantPool.getEntry(classIndex);
   
           methodClass.resolve(constantPool);
   
           methodClassName = methodClass.getClassName();
   
  -        NameAndTypeCPInfo nt = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);
  +        NameAndTypeCPInfo nt
  +             = (NameAndTypeCPInfo)constantPool.getEntry(nameAndTypeIndex);
   
           nt.resolve(constantPool);
   
  @@ -130,14 +139,29 @@
           super.resolve(constantPool);
       }
   
  +    /**
  +     * Get the name of the class defining the method
  +     *
  +     * @return the name of the class defining this method
  +     */
       public String getMethodClassName() {
           return methodClassName;
       }
   
  +    /**
  +     * Get the name of the method.
  +     *
  +     * @return the name of the method.
  +     */
       public String getMethodName() {
           return methodName;
       }
   
  +    /**
  +     * Get the type signature of the method.
  +     *
  +     * @return the type signature of the method.
  +     */
       public String getMethodType() {
           return methodType;
       }
  
  
  
  1.5       +31 -13    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/NameAndTypeCPInfo.java
  
  Index: NameAndTypeCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/NameAndTypeCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- NameAndTypeCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ NameAndTypeCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,7 +56,6 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
    * A NameAndType CP Info
    *
  @@ -64,20 +63,18 @@
    */
   public class NameAndTypeCPInfo extends ConstantPoolEntry {
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor. */
       public NameAndTypeCPInfo() {
  -        super(CONSTANT_NameAndType, 1);
  +        super(CONSTANT_NAMEANDTYPE, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           nameIndex = cpStream.readUnsignedShort();
  @@ -95,7 +92,8 @@
           if (isResolved()) {
               value = "Name = " + name + ", type = " + type;
           } else {
  -            value = "Name index = " + nameIndex + ", descriptor index = " + descriptorIndex;
  +            value = "Name index = " + nameIndex
  +                 + ", descriptor index = " + descriptorIndex;
           }
   
           return value;
  @@ -115,17 +113,37 @@
           super.resolve(constantPool);
       }
   
  +    /**
  +     * Get the name component of this entry
  +     *
  +     * @return the name of this name and type entry
  +     */
       public String getName() {
           return name;
       }
   
  +    /**
  +     * Get the type signature of this entry
  +     *
  +     * @return the type signature of this entry
  +     */
       public String getType() {
           return type;
       }
   
  +    /** the name component of this entry */
       private String name;
  +    /** the type component of this entry */
       private String type;
  +    /**
  +     * the index into the constant pool at which the name component's string
  +     * value is stored
  +     */
       private int nameIndex;
  +    /**
  +     * the index into the constant pool where the type descriptor string is
  +     * stored.
  +     */
       private int descriptorIndex;
   }
   
  
  
  
  1.5       +13 -16    jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/StringCPInfo.java
  
  Index: StringCPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/StringCPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- StringCPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ StringCPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,31 +56,26 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
  - * A String Constant Pool Entry.
  - *
  - * The String info contains an index into the constant pool where
  - * a UTF8 string is stored.
  + * A String Constant Pool Entry. The String info contains an index into the
  + * constant pool where a UTF8 string is stored.
    *
    * @author Conor MacNeill
    */
   public class StringCPInfo extends ConstantCPInfo {
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor.  */
       public StringCPInfo() {
  -        super(CONSTANT_String, 1);
  +        super(CONSTANT_STRING, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           index = cpStream.readUnsignedShort();
  @@ -94,7 +89,8 @@
        * @return the string representation of this constant pool entry.
        */
       public String toString() {
  -        return "String Constant Pool Entry for " + getValue() + "[" + index + "]";
  +        return "String Constant Pool Entry for " 
  +            + getValue() + "[" + index + "]";
       }
   
       /**
  @@ -109,6 +105,7 @@
           super.resolve(constantPool);
       }
   
  +    /** the index into the constant pool containing the string's content */
       private int index;
   }
   
  
  
  
  1.5       +12 -9     jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/Utf8CPInfo.java
  
  Index: Utf8CPInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/constantpool/Utf8CPInfo.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -w -u -r1.4 -r1.5
  --- Utf8CPInfo.java	8 Jan 2002 23:47:59 -0000	1.4
  +++ Utf8CPInfo.java	3 Feb 2002 10:12:16 -0000	1.5
  @@ -56,29 +56,27 @@
   import java.io.DataInputStream;
   import java.io.IOException;
   
  -
   /**
    * A UTF8 Constant Pool Entry.
    *
    * @author Conor MacNeill
    */
   public class Utf8CPInfo extends ConstantPoolEntry {
  +    /** The String value of the UTF-8 entry */
       private String value;
   
  -    /**
  -     * Constructor.
  -     *
  -     */
  +    /** Constructor.  */
       public Utf8CPInfo() {
  -        super(CONSTANT_Utf8, 1);
  +        super(CONSTANT_UTF8, 1);
       }
   
       /**
        * read a constant pool entry from a class stream.
        *
  -     * @param cpStream the DataInputStream which contains the constant pool entry to be read.
  -     *
  -     * @throws IOException if there is a problem reading the entry from the stream.
  +     * @param cpStream the DataInputStream which contains the constant pool
  +     *      entry to be read.
  +     * @exception IOException if there is a problem reading the entry from
  +     *      the stream.
        */
       public void read(DataInputStream cpStream) throws IOException {
           value = cpStream.readUTF();
  @@ -93,6 +91,11 @@
           return "UTF8 Value = " + value;
       }
   
  +    /**
  +     * Get the string value of the UTF-8 entry
  +     *
  +     * @return the UTF-8 value as a Java string
  +     */
       public String getValue() {
           return value;
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message