Class ClassPath

java.lang.Object
com.google.common.reflect.ClassPath

@Beta @Deprecated(since="2022-12-01") public final class ClassPath extends Object
Deprecated.
The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
Scans the source of a ClassLoader and finds all loadable classes and resources.
Since:
14.0
  • Method Details

    • from

      public static ClassPath from(ClassLoader classloader) throws IOException
      Deprecated.
      Returns a ClassPath representing all classes and resources loadable from classloader and its parent class loaders.

      Currently only URLClassLoader and only file:// urls are supported.

      Throws:
      IOException - if the attempt to read class path resources (jar files or directories) failed.
    • getResources

      public ImmutableSet<ClassPath.ResourceInfo> getResources()
      Deprecated.
      Returns all resources loadable from the current class path, including the class files of all loadable classes but excluding the "META-INF/MANIFEST.MF" file.
    • getTopLevelClasses

      public ImmutableSet<ClassPath.ClassInfo> getTopLevelClasses()
      Deprecated.
      Returns all top level classes loadable from the current class path.
    • getTopLevelClasses

      public ImmutableSet<ClassPath.ClassInfo> getTopLevelClasses(String packageName)
      Deprecated.
      Returns all top level classes whose package name is packageName.
    • getTopLevelClassesRecursive

      public ImmutableSet<ClassPath.ClassInfo> getTopLevelClassesRecursive(String packageName)
      Deprecated.
      Returns all top level classes whose package name is packageName or starts with packageName followed by a '.'.