|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ch.elca.dependency.core.Analyzer
This class is the main responsible one for parsing the whole class structure
in the directory tree. It uses the Reader
class for reading the
class files contained by the class structure.
Every file in the directory structure is parsed recursively if it is a java
class file. This is determined by looking at the file extension of the
corresponding file. If a file has no file extension the type cannot be
determined and so it will not be parsed as a java class file.
Because sometimes in a large project there are many files with partially no
file extension, there are two possibilities for handling this case.
The files with no file extension can be skipped and are not included in the analyse. Or the whole analyse can be canceled with a corresponding message to the user. This behaviour is specified by the third argument (boolean) in the constructor of this class. If the argument is true, file extensions are required and if there is a file without any, the application is stopped. If this argument is false all the files with no file extension are just skipped and the analyse is performed whithout these files.
Reader
,
RawModel
,
Filter
Constructor Summary | |
Analyzer(java.io.File root,
Filter filter)
Creates a new Analyzer instance. |
Method Summary | |
void |
analyse()
Performs the analyse on the specified directory root in the constructor. |
java.util.HashMap |
getClassInfos()
Gets all the ClassInfo objects which have passed the load
filter. |
java.util.HashMap |
getDependencies()
Gets the dependencies encountered by the analyse. |
java.io.File |
getProjectRoot()
Get the project root file. |
Statistic |
getStatistics()
Gets the Statistic object containing all the statistical data gained from the analyse. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Analyzer(java.io.File root, Filter filter) throws AnalyseException
Analyzer
instance.
root
- a File
valuefilter
- a Filter
value
AnalyseException
- if an error occursMethod Detail |
public void analyse() throws AnalyseException
AnalyseException
public java.util.HashMap getDependencies() throws AnalyseException
HashTable
containing all the packages
dependencies.
AnalyseException
public java.util.HashMap getClassInfos()
ClassInfo
objects which have passed the load
filter.
ClassInfo
objects of this
project which have passed the load filter.public Statistic getStatistics() throws AnalyseException
AnalyseException
- If the 'analyse()' method was not called
before.public java.io.File getProjectRoot()
File
value
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |