annotations-impl/src/main/java/org/ocpsoft/rewrite/annotation/scan/PackageFilter.java
public boolean isAllowedPackage(String packageName)
   {

      // No packages in set? Accept all packages.
      if (packageSet.isEmpty())
      {
         return true;
      }

      // check all valid packages
      for (String validPackage : packageSet)
      {
         // accept if package is a sub-package of a valid package
         if (packageName.startsWith(validPackage))
         {
            return true;
         }
      }

      // package noch accepted
      return false;

   }
public boolean isAllowedPackage(String packageName)
   {

      // No packages in set? Accept all packages.
      if (packageSet.isEmpty())
      {
         return true;
      }

      // check all valid packages
      for (String validPackage : packageSet)
      {
         // accept if package is a sub-package of a valid package
         if (packageName.startsWith(validPackage))
         {
            return true;
         }
      }

      // package noch accepted
      return false;

   }
<p>
Checks whether the supplied packages matches the filter.
</p>
<p>
The method returns <code>true</code> if one of the following checks succeed:
</p>
<ul>
<li>The supplied package is one of the packages specified in the filter condition.</li>
<li>The supplied package is a sub-package of one of the packages specified in the filter condition.</li>
</ul>

@param packageName A package name
@return <code>true</code> if the filter matches