jdepend.framework
Class PackageFilter

java.lang.Object
  |
  +--jdepend.framework.PackageFilter

public class PackageFilter
extends java.lang.Object

The PackageFilter class is used to filter imported package names.

The default filter contains the java.* and javax.* packages, as well as any packages declared in the jdepend.properties file.

The jdepend.properties file can be located in the user's home directory or the classpath.

Author:
Mike Clark, Clarkware Consulting, Inc.

Constructor Summary
PackageFilter()
          Constructs a PackageFilter instance.
PackageFilter(java.util.Collection names)
          Constructs a PackageFilter instance with the specified collection of package names to filter.
PackageFilter(java.io.File f)
          Constructs a PackageFilter instance with the specified filter file.
 
Method Summary
 boolean accept(java.lang.String name)
          Indicates whether the specified package name should be included in a parsed Java class.
protected  void addFilteredPackageNames()
           
 void addPackage(java.lang.String name)
          Adds the specified package name to the collection of packages to be filtered.
protected  java.io.File getDefaultFilterFile()
           
protected  java.io.File getFilterFile()
           
protected  java.util.Properties loadProperties()
           
protected  void setFilterFile(java.io.File f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackageFilter

public PackageFilter()
Constructs a PackageFilter instance.
Parameters:
names - Package names to filter.

PackageFilter

public PackageFilter(java.util.Collection names)
Constructs a PackageFilter instance with the specified collection of package names to filter.
Parameters:
names - Package names to filter.

PackageFilter

public PackageFilter(java.io.File f)
Constructs a PackageFilter instance with the specified filter file.
Parameters:
f - Filter file.
Method Detail

accept

public boolean accept(java.lang.String name)
Indicates whether the specified package name should be included in a parsed Java class.
Parameters:
name - Package name.
Returns:
true if the package name should be included; false otherwise.

addPackage

public void addPackage(java.lang.String name)
Adds the specified package name to the collection of packages to be filtered.
Parameters:
name - Package name.

addFilteredPackageNames

protected void addFilteredPackageNames()

setFilterFile

protected void setFilterFile(java.io.File f)

getFilterFile

protected java.io.File getFilterFile()

getDefaultFilterFile

protected java.io.File getDefaultFilterFile()

loadProperties

protected java.util.Properties loadProperties()


Copyright © 1999-2002 Clarkware Consulting, Inc. All Rights Reserved.