jdepend.framework

Class FileManager


public class FileManager
extends java.lang.Object

The FileManager class is responsible for extracting Java class files (.class files) from a collection of registered directories.
Authors:
Mike Clark (mike@clarkware.com)
Clarkware Consulting, Inc.

Constructor Summary

FileManager()
Constructs an empty FileManager instance.

Method Summary

boolean
acceptClassFile(File file)
Indicates whether the specified file is a valid Java class file.
boolean
acceptClassFileName(String name)
Indicates whether the specified file name is a valid Java class file.
boolean
acceptFile(File file)
Indicates whether the specified file is a valid file.
void
acceptInnerClasses(boolean b)
Determines whether inner classes should be collected.
boolean
acceptJarFile(File file)
Indicates whether the specified file is a valid jar file file.
void
addDirectory(String name)
Adds the specified directory to the collection of directories to be managed.
Collection
extractFiles()
Returns the Java class files contained in the managed directories.

Constructor Details

FileManager

public FileManager()
Constructs an empty FileManager instance.

Method Details

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)
            throws IOException
Adds the specified directory to the collection of directories to be managed.
Parameters:
name - Directory name.

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.