Class PackageScanUtils

java.lang.Object
com.ultikits.ultitools.utils.PackageScanUtils

public class PackageScanUtils extends Object
Utility class for package scanning and class discovery operations. Provides methods to scan packages and find classes with specific annotations. Uses Google Guava's ClassPath for efficient class scanning.
Since:
6.0.0
Author:
wisdomme
See Also:
  • ClassPath
  • Constructor Details

    • PackageScanUtils

      public PackageScanUtils()
  • Method Details

    • scanAnnotatedClasses

      public static Set<Class<?>> scanAnnotatedClasses(Class<? extends Annotation> targetAnnotation, String packageName, ClassLoader classLoader)
      Scan for classes annotated with a specific annotation in a given package. This method recursively scans all classes in the specified package and its sub-packages.
      Parameters:
      targetAnnotation - the target annotation class to search for
      packageName - the package name to scan
      classLoader - the class loader to use for scanning
      Returns:
      a set of classes annotated with the target annotation