com.generationjava.util
Class ClassIndex

java.lang.Object
  |
  +--com.generationjava.util.ClassIndex
All Implemented Interfaces:
FindListener

public class ClassIndex
extends java.lang.Object
implements FindListener

Indexes a class path.


Constructor Summary
ClassIndex()
          Create an index of the runtime classpath.
ClassIndex(java.lang.String classpath)
          Creates an index of the given classpath.
 
Method Summary
 void directoryFinished(com.generationjava.io.find.FindEvent findEvent)
          A directory has been finished.
 void directoryStarted(com.generationjava.io.find.FindEvent findEvent)
          A directory has begun to be looked at by a Finder.
 void fileFound(com.generationjava.io.find.FindEvent findEvent)
          A file has been found.
 java.util.Collection getClassesIn(java.lang.String packagename)
           
 java.lang.String getPackage(java.lang.String classname)
          Get the package that a given classname is in.
 java.util.Collection getPackagesIn(java.lang.String packagename)
           
 java.util.Collection getRootClasses()
           
 java.util.Collection getRootPackages()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassIndex

public ClassIndex()
Create an index of the runtime classpath.


ClassIndex

public ClassIndex(java.lang.String classpath)
Creates an index of the given classpath.

Method Detail

getPackage

public java.lang.String getPackage(java.lang.String classname)
Get the package that a given classname is in.


getRootClasses

public java.util.Collection getRootClasses()

getClassesIn

public java.util.Collection getClassesIn(java.lang.String packagename)

getRootPackages

public java.util.Collection getRootPackages()

getPackagesIn

public java.util.Collection getPackagesIn(java.lang.String packagename)

directoryStarted

public void directoryStarted(com.generationjava.io.find.FindEvent findEvent)
Description copied from interface: FindListener
A directory has begun to be looked at by a Finder.

Specified by:
directoryStarted in interface FindListener

directoryFinished

public void directoryFinished(com.generationjava.io.find.FindEvent findEvent)
Description copied from interface: FindListener
A directory has been finished. The FindEvent will contain an array of the filenames found.

Specified by:
directoryFinished in interface FindListener

fileFound

public void fileFound(com.generationjava.io.find.FindEvent findEvent)
Description copied from interface: FindListener
A file has been found. The FindEvent will contain the filename found.

Specified by:
fileFound in interface FindListener


Copyright © 2000-2003 OSJava. All Rights Reserved.