jdepend.framework

Class FileManager

public class FileManager extends Object

The FileManager class is responsible for extracting Java class files (.class files) from a collection of registered directories.

Author: Mike Clark (mike@clarkware.com) Clarkware Consulting, Inc.

Constructor Summary
FileManager()
Constructs an empty FileManager instance.
Method Summary
booleanacceptClassFile(File file)
Indicates whether the specified file is a valid Java class file.
booleanacceptClassFileName(String name)
Indicates whether the specified file name is a valid Java class file.
booleanacceptFile(File file)
Indicates whether the specified file is a valid file.
voidacceptInnerClasses(boolean b)
Determines whether inner classes should be collected.
booleanacceptJarFile(File file)
Indicates whether the specified file is a valid jar file file.
voidaddDirectory(String name)
Adds the specified directory to the collection of directories to be managed.
CollectionextractFiles()
Returns the Java class files contained in the managed directories.

Constructor Detail

FileManager

public FileManager()
Constructs an empty FileManager instance.

Method Detail

acceptClassFile

public boolean acceptClassFile(File file)
Indicates whether the specified file is a valid Java class file.

Parameters: file Candidate file.

Returns: true if the file is valid; false otherwise.

acceptClassFileName

public boolean acceptClassFileName(String name)
Indicates whether the specified file name is a valid Java class file.

Parameters: name Candidate file name.

Returns: true if the name is valid; false otherwise.

acceptFile

public boolean acceptFile(File file)
Indicates whether the specified file is a valid file.

Parameters: file Candidate file.

Returns: true if the file is valid; false otherwise.

acceptInnerClasses

public void acceptInnerClasses(boolean b)
Determines whether inner classes should be collected.

Parameters: b true to collect inner classes; false otherwise.

acceptJarFile

public boolean acceptJarFile(File file)
Indicates whether the specified file is a valid jar file file.

Parameters: file Candidate file.

Returns: true if the file is valid; false otherwise.

addDirectory

public void addDirectory(String name)
Adds the specified directory to the collection of directories to be managed.

Parameters: name Directory name.

Throws: IOException If the directory is invalid.

extractFiles

public Collection extractFiles()
Returns the Java class files contained in the managed directories.

Returns: Collection of source and class files.

Copyright B) 1999-2003 Clarkware Consulting, Inc.