public ResolverUtil<T> findAnnotated(Class<? extends Annotation> annotation, String... packageNames) {
    if (packageNames == null) {
      return this;
    }

    Test test = new AnnotatedWith(annotation);
    for (String pkg : packageNames) {
      find(test, pkg);
    }

    return this;
  }
Attempts to discover classes that are annotated with the annotation. Accumulated
classes can be accessed by calling {@link #getClasses()}.

@param annotation the annotation that should be present on matching classes
@param packageNames one or more package names to scan (including subpackages) for classes
src/main/java/org/apache/ibatis/io/ResolverUtil.java