LocationMatcher implements Comparable<LocationMatcher> { public boolean matchesPackageClass(String packageName, String className) { return matchesPattern(loc.pack, packageName) && matchesClassPattern(loc.clazz, className) && matchesAll(loc.method); } LocationMatcher(Location location); boolean matchesPackage(String packageName); boolean matchesClass(String className); boolean matchesPackageClass(String packageName, String className); boolean matches(String packageName, String className, String methodName); boolean matchesLanguage(Language language); int specificity(); String getPattern(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Override int compareTo(LocationMatcher p);  }
@Test void wildcardPackageAndClass2() { final LocationMatcher m = new LocationMatcher(Location.of("a*.B")); assertTrue(m.matchesPackageClass("a", "B")); assertTrue(m.matchesPackageClass("ab", "B")); assertTrue(m.matchesPackageClass("a.b", "B")); assertFalse(m.matchesPackageClass("b", "B")); assertFalse(m.matchesPackageClass("a", "C")); }