Package com.google.common.reflect
Class ClassPath
- java.lang.Object
-
- com.google.common.reflect.ClassPath
-
@Beta @Deprecated(since="2022-12-01") public final class ClassPath extends java.lang.Object
Deprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023Scans the source of aClassLoader
and finds all loadable classes and resources.- Since:
- 14.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClassPath.ClassInfo
Deprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023static class
ClassPath.ResourceInfo
Deprecated.The Google Guava Core Libraries are deprecated and will not be part of the AEM SDK after April 2023
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ClassPath
from(java.lang.ClassLoader classloader)
Deprecated.Returns aClassPath
representing all classes and resources loadable fromclassloader
and its parent class loaders.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.ImmutableSet<ClassPath.ClassInfo>
getTopLevelClasses()
Deprecated.Returns all top level classes loadable from the current class path.ImmutableSet<ClassPath.ClassInfo>
getTopLevelClasses(java.lang.String packageName)
Deprecated.Returns all top level classes whose package name ispackageName
.ImmutableSet<ClassPath.ClassInfo>
getTopLevelClassesRecursive(java.lang.String packageName)
Deprecated.Returns all top level classes whose package name ispackageName
or starts withpackageName
followed by a '.'.
-
-
-
Method Detail
-
from
public static ClassPath from(java.lang.ClassLoader classloader) throws java.io.IOException
Deprecated.Returns aClassPath
representing all classes and resources loadable fromclassloader
and its parent class loaders.Currently only
URLClassLoader
and onlyfile://
urls are supported.- Throws:
java.io.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(java.lang.String packageName)
Deprecated.Returns all top level classes whose package name ispackageName
.
-
getTopLevelClassesRecursive
public ImmutableSet<ClassPath.ClassInfo> getTopLevelClassesRecursive(java.lang.String packageName)
Deprecated.Returns all top level classes whose package name ispackageName
or starts withpackageName
followed by a '.'.
-
-