jdepend.framework
Class FileManager

java.lang.Object
  |
  +--jdepend.framework.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.

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

Constructor Summary
FileManager()
          Constructs an empty FileManager instance.
 
Method Summary
 boolean acceptClassFile(java.io.File file)
          Indicates whether the specified file is a valid Java class file.
 boolean acceptClassFileName(java.lang.String name)
          Indicates whether the specified file name is a valid Java class file.
 boolean acceptFile(java.io.File file)
          Indicates whether the specified file is a valid file.
 void acceptInnerClasses(boolean b)
          Determines whether inner classes should be collected.
 boolean acceptJarFile(java.io.File file)
          Indicates whether the specified file is a valid jar file file.
 void addDirectory(java.lang.String name)
          Adds the specified directory to the collection of directories to be managed.
 java.util.Collection extractFiles()
          Returns the Java class files contained in the managed directories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManager

public FileManager()
Constructs an empty FileManager instance.

Method Detail

acceptInnerClasses

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

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

addDirectory

public void addDirectory(java.lang.String name)
                  throws java.io.IOException
Adds the specified directory to the collection of directories to be managed.

Parameters:
name - Directory name.
Throws:
java.io.IOException - If the directory is invalid.

acceptFile

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

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

acceptClassFile

public boolean acceptClassFile(java.io.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(java.lang.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.

acceptJarFile

public boolean acceptJarFile(java.io.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.

extractFiles

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

Returns:
Collection of source and class files.


Copyright © 1999-2003 Clarkware Consulting, Inc.