Class PackageFilter
java.lang.Object
org.ocpsoft.rewrite.annotation.scan.PackageFilter
This class represents a package filter specified by the com.ocpsoft.pretty.SCAN_PACKAGES initialization
parameter.
- Author:
- Christian Kaltepoth
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the total number of base packages that this instance is holding.booleanisAllowedPackage(String packageName) Checks whether the supplied packages matches the filter.toString()
-
Constructor Details
-
PackageFilter
Creates a newPackageFilter- Parameters:
config- Comma-separated list of packages (null safe)
-
-
Method Details
-
isAllowedPackage
Checks whether the supplied packages matches the filter.
The method returns
trueif one of the following checks succeed:- The supplied package is one of the packages specified in the filter condition.
- The supplied package is a sub-package of one of the packages specified in the filter condition.
- Parameters:
packageName- A package name- Returns:
trueif the filter matches
-
getNumberOfBasePackages
public int getNumberOfBasePackages()Returns the total number of base packages that this instance is holding.- Returns:
- Number of base packages
-
toString
-