Package jdepend.framework
Class PackageFilter
- java.lang.Object
-
- jdepend.framework.PackageFilter
-
public class PackageFilter extends java.lang.Object
ThePackageFilter
class is used to filter imported package names.The default filter contains any packages declared in the
jdepend.properties
file, if such a file exists either in the user's home directory or somewhere in the classpath.- Author:
- Mike Clark, Clarkware Consulting, Inc.
-
-
Constructor Summary
Constructors Constructor Description PackageFilter()
Constructs aPackageFilter
instance containing the filters specified in thejdepend.properties
file, if it exists.PackageFilter(java.io.File f)
Constructs aPackageFilter
instance containing the filters contained in the specified file.PackageFilter(java.util.Collection packageNames)
Constructs aPackageFilter
instance with the specified collection of package names to filter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(java.lang.String packageName)
Indicates whether the specified package name passes this package filter.void
addPackage(java.lang.String packageName)
void
addPackages(java.util.Collection packageNames)
java.util.Collection
getFilters()
Returns the collection of filtered package names.
-
-
-
Constructor Detail
-
PackageFilter
public PackageFilter()
Constructs aPackageFilter
instance containing the filters specified in thejdepend.properties
file, if it exists.
-
PackageFilter
public PackageFilter(java.io.File f)
Constructs aPackageFilter
instance containing the filters contained in the specified file.- Parameters:
f
- Property file.
-
PackageFilter
public PackageFilter(java.util.Collection packageNames)
Constructs aPackageFilter
instance with the specified collection of package names to filter.- Parameters:
packageNames
- Package names to filter.
-
-
Method Detail
-
getFilters
public java.util.Collection getFilters()
Returns the collection of filtered package names.- Returns:
- Filtered package names.
-
accept
public boolean accept(java.lang.String packageName)
Indicates whether the specified package name passes this package filter.- Parameters:
packageName
- Package name.- Returns:
true
if the package name should be included;false
otherwise.
-
addPackages
public void addPackages(java.util.Collection packageNames)
-
addPackage
public void addPackage(java.lang.String packageName)
-
-