|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.util.depend.AbstractAnalyzer
An abstract implementation of the analyzer interface providing support for the bulk of interface methods.
Field Summary | |
static int |
MAX_LOOPS
Maximum number of loops for looking for indirect dependencies. |
Constructor Summary | |
protected |
AbstractAnalyzer()
Setup the analyzer |
Method Summary | |
void |
addClassPath(Path classPath)
Add a classpath to the classpath being used by the analyzer. |
void |
addRootClass(java.lang.String className)
Add a root class. |
void |
addSourcePath(Path sourcePath)
Add a source path to the source path used by this analyzer. |
void |
config(java.lang.String name,
java.lang.Object info)
Configure an aspect of the analyzer. |
protected abstract void |
determineDependencies(java.util.Vector files,
java.util.Vector classes)
Determine the dependencies of the current set of root classes |
java.io.File |
getClassContainer(java.lang.String classname)
Get the file that contains the class definition |
java.util.Enumeration |
getClassDependencies()
Get the list of classes upon which root classes depend. |
java.util.Enumeration |
getFileDependencies()
Get the list of files in the file system upon which the root classes depend. |
protected java.util.Enumeration |
getRootClasses()
Get an enumeration of the root classes |
java.io.File |
getSourceContainer(java.lang.String classname)
Get the file that contains the class source. |
protected boolean |
isClosureRequired()
Indicate if the analyzer is required to follow indirect class relationships. |
void |
reset()
Reset the dependency list. |
void |
setClosure(boolean closure)
Set the closure flag. |
protected abstract boolean |
supportsFileDependencies()
Indicate if the particular subclass supports file dependency information. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX_LOOPS
Constructor Detail |
protected AbstractAnalyzer()
Method Detail |
public void setClosure(boolean closure)
setClosure
in interface DependencyAnalyzer
closure
- true if dependencies should be traversed to determine
indirect dependencies.public java.util.Enumeration getFileDependencies()
getFileDependencies
in interface DependencyAnalyzer
public java.util.Enumeration getClassDependencies()
getClassDependencies
in interface DependencyAnalyzer
public java.io.File getClassContainer(java.lang.String classname) throws java.io.IOException
getClassContainer
in interface DependencyAnalyzer
classname
- the name of the required class
java.io.IOException
- if the files in the classpath cannot be read.public java.io.File getSourceContainer(java.lang.String classname) throws java.io.IOException
getSourceContainer
in interface DependencyAnalyzer
classname
- the name of the required class
java.io.IOException
- if the files in the sourcepath cannot be read.public void addSourcePath(Path sourcePath)
addSourcePath
in interface DependencyAnalyzer
sourcePath
- The Path instance specifying the source path
elements.public void addClassPath(Path classPath)
addClassPath
in interface DependencyAnalyzer
classPath
- the Path instance specifying the classpath elementspublic void addRootClass(java.lang.String className)
addRootClass
in interface DependencyAnalyzer
className
- the name of the class in Java dot notation.public void config(java.lang.String name, java.lang.Object info)
config
in interface DependencyAnalyzer
name
- the name of the aspect being configuredinfo
- the configuration info.public void reset()
reset
in interface DependencyAnalyzer
protected java.util.Enumeration getRootClasses()
protected boolean isClosureRequired()
protected abstract void determineDependencies(java.util.Vector files, java.util.Vector classes)
files
- a vector into which Files upon which the root classes
depend should be placed.classes
- a vector of Strings into which the names of classes
upon which the root classes depend should be placed.protected abstract boolean supportsFileDependencies()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |