| Modifier and Type | Class and Description |
|---|---|
| public static enum | ScanSpec.
Whether a path is a descendant of a rejected path, or an ancestor or descendant of an accepted path. |
| Modifier and Type | Field and Description |
|---|---|
| public transient List | addedClassLoaders
If non-null, specifies manually-added classloaders that should be searched after the context classloader(s). |
| public transient List | addedModuleLayers
If non-null, specifies manually-added ModuleLayers that should be searched after the visible ModuleLayers. |
| public Set | allowedURLSchemes
URL schemes that are allowed in classpath elements (not counting the optional "jar:" prefix and/or "file:", which are automatically allowed). |
| public AcceptReject. | classAcceptReject
Class accept/reject criteria (fully-qualified class names, with separator '.'). |
| public AcceptReject. | classfilePathAcceptReject
Classfile accept/reject criteria (path to classfiles, with separator '/', ending in ".class"). |
| public AcceptReject. | classPackageAcceptReject
Package containing accept/reject criteriaed classes (with separator '.'). |
| public AcceptReject. | classPackagePathAcceptReject
Path to accept/reject criteriaed classes (with separator '/'). |
| public transient List | classpathElementFilters
If non-null, a list of filter operations to apply to classpath elements. |
| public AcceptReject. | classpathElementResourcePathAcceptReject
Classpath element resource path accept/reject criteria. |
| public boolean | disableRuntimeInvisibleAnnotations
If true, don't scan runtime-invisible annotations (only scan annotations with RetentionPolicy.RUNTIME). |
| public boolean | enableAnnotationInfo
If true, enables the saving of annotation info (for class, field, method or method parameter annotations) during the scan. |
| public boolean | enableClassInfo
If true, scan classfile bytecodes, producing |
| public boolean | enableExternalClasses
If true, allow external classes (classes outside of accepted packages) to be returned in the ScanResult, if they are directly referred to by an accepted class, as a superclass, implemented interface or annotation. |
| public boolean | enableFieldInfo
If true, enables the saving of field info during the scan. |
| public boolean | enableInterClassDependencies
If true, enables the determination of inter-class dependencies. |
| public boolean | enableMemoryMapping
If true, use a |
| public boolean | enableMethodInfo
If true, enables the saving of method info during the scan. |
| public boolean | enableMultiReleaseVersions
If true, all multi-release versions of a resource are found. |
| public boolean | enableStaticFinalFieldConstantInitializerValues
Enable the storing of constant initializer values for static final fields in ClassInfo objects. |
| public boolean | enableSystemJarsAndModules
If true, system jarfiles (rt.jar) and system packages and modules (java.*, jre.*, etc.) should be scanned . |
| public boolean | extendScanningUpwardsToExternalClasses
If true, when classes have superclasses, implemented interfaces or annotations that are external classes, those classes are also scanned. |
| public boolean | ignoreClassVisibility
If true, ignore class visibility. |
| public boolean | ignoreFieldVisibility
If true, ignore field visibility. |
| public boolean | ignoreMethodVisibility
If true, ignore method visibility. |
| public boolean | ignoreParentClassLoaders
If true, do not fetch paths from parent classloaders. |
| public boolean | ignoreParentModuleLayers
If true, do not scan module layers that are the parent of other module layers. |
| public boolean | initializeLoadedClasses
Whether to initialize classes when loading them. |
| public AcceptReject. | jarAcceptReject
Jar accept/reject criteria (leafname only, ending in ".jar"). |
| public AcceptReject. | libOrExtJarAcceptReject
lib/ext jar accept/reject criteria (leafname only, ending in ".jar"). |
| public int | maxBufferedJarRAMSize
The maximum size of an inner (nested) jar that has been deflated (i.e. compressed, not stored) within an
outer jar, before it has to be spilled to disk rather than stored in a RAM-backed |
| public AcceptReject. | moduleAcceptReject
Module accept/reject criteria (with separator '.'). |
| public ModulePathInfo | modulePathInfo
Commandline module path parameters. |
| public transient List | overrideClassLoaders
If non-null, this list of ClassLoaders will be searched instead of the visible/context ClassLoader(s). |
| public List | overrideClasspath
If non-null, specifies a list of classpath elements (String, |
| public transient List | overrideModuleLayers
If non-null, this list of ModuleLayers will be searched instead of the visible ModuleLayers. |
| public AcceptReject. | packageAcceptReject
Package accept/reject criteria (with separator '.'). |
| public AcceptReject. | packagePrefixAcceptReject
Package prefix accept/reject criteria, for recursive scanning (with separator '.', ending in '.'). |
| public AcceptReject. | pathAcceptReject
Path accept/reject criteria (with separator '/'). |
| public AcceptReject. | pathPrefixAcceptReject
Path prefix accept/reject criteria, for recursive scanning (with separator '/', ending in '/'). |
| public boolean | removeTemporaryFilesAfterScan
If true, nested jarfiles (jarfiles within jarfiles) that are extracted during scanning are removed from their temporary directory (e.g. /tmp/ClassGraph-8JX2u4w) after the scan has completed. |
| public boolean | scanDirs
If true, scan directories. |
| public boolean | scanJars
If true, scan jarfiles. |
| public boolean | scanModules
If true, scan modules. |
| public boolean | scanNestedJars
If true, scan nested jarfiles (jarfiles within jarfiles). |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addClassLoader(final ClassLoader
The classloader to add. classLoader)Add a ClassLoader to the list of ClassLoaders to scan. |
| public void | addClasspathOverride(final Object
The classpath element to add as an override to the default classpath. overrideClasspathElement)Override the automatically-detected classpath with a custom path. |
| public void | addModuleLayer(final Object
The additional ModuleLayer to scan. (The parameter is of type moduleLayer)Object for backwards
compatibility with JDK 7 and JDK 8, but the argument should be of type ModuleLayer.)Add a ModuleLayer to the list of ModuleLayers to scan. |
| public boolean | Returns: true if the given relative path (for a classfile name, including ".class") matches a specifically-accepted (and non-rejected) classfile's relative path.the relative path relativePath)Returns true if the given relative path (for a classfile name, including ".class") matches a specifically-accepted (and non-rejected) classfile's relative path. |
| public boolean | Returns: true if the class is specifically rejected, or is within a rejected package.the class name className)Returns true if the class is specifically rejected, or is within a rejected package. |
| public ScanSpec. | Returns: theScanSpecPathMatchthe relative path relativePath)Returns true if the given directory path is a descendant of a rejected path, or an ancestor or descendant of an accepted path. |
| public void | enableURLScheme(final String
the scheme, e.g. "http". scheme)Allow a specified URL scheme in classpath elements. |
| public void | filterClasspathElements(final Object
The classpath element filter to apply to all discovered classpath elements, to decide which should
be scanned. filterLambda)Add a classpath element filter. |
| private static boolean | Returns: true if the argument is a ModuleLayer or a subclass of ModuleLayer.the module layer moduleLayer)Return true if the argument is a ModuleLayer or a subclass of ModuleLayer. |
| public void | |
| public void | overrideClassLoaders(final ClassLoader...
The classloaders to override the default context classloaders with. overrideClassLoaders)Completely override the list of ClassLoaders to scan. |
| public void | overrideModuleLayers(final Object...
The ModuleLayers to scan instead of the automatically-detected ModuleLayers. (The parameter is of
type overrideModuleLayers)Object[] for backwards compatibility with JDK 7 and JDK 8, but the argument should be
of type ModuleLayer[].)Completely override (and ignore) the visible ModuleLayers, and instead scan the requested ModuleLayers. |
| public void |
| addedClassLoaders | back to summary |
|---|---|
| public transient List<ClassLoader> addedClassLoaders If non-null, specifies manually-added classloaders that should be searched after the context classloader(s). | |
| addedModuleLayers | back to summary |
|---|---|
| public transient List<Object> addedModuleLayers If non-null, specifies manually-added ModuleLayers that should be searched after the visible ModuleLayers. | |
| allowedURLSchemes | back to summary |
|---|---|
| public Set<String> allowedURLSchemes URL schemes that are allowed in classpath elements (not counting the optional "jar:" prefix and/or "file:", which are automatically allowed). | |
| classAcceptReject | back to summary |
|---|---|
| public AcceptReject. Class accept/reject criteria (fully-qualified class names, with separator '.'). | |
| classfilePathAcceptReject | back to summary |
|---|---|
| public AcceptReject. Classfile accept/reject criteria (path to classfiles, with separator '/', ending in ".class"). | |
| classPackageAcceptReject | back to summary |
|---|---|
| public AcceptReject. Package containing accept/reject criteriaed classes (with separator '.'). | |
| classPackagePathAcceptReject | back to summary |
|---|---|
| public AcceptReject. Path to accept/reject criteriaed classes (with separator '/'). | |
| classpathElementFilters | back to summary |
|---|---|
| public transient List<Object> classpathElementFilters If non-null, a list of filter operations to apply to classpath elements. | |
| classpathElementResourcePathAcceptReject | back to summary |
|---|---|
| public AcceptReject. Classpath element resource path accept/reject criteria. | |
| disableRuntimeInvisibleAnnotations | back to summary |
|---|---|
| public boolean disableRuntimeInvisibleAnnotations If true, don't scan runtime-invisible annotations (only scan annotations with RetentionPolicy.RUNTIME). | |
| enableAnnotationInfo | back to summary |
|---|---|
| public boolean enableAnnotationInfo If true, enables the saving of annotation info (for class, field, method or method parameter annotations)
during the scan. This information can be obtained using | |
| enableClassInfo | back to summary |
|---|---|
| public boolean enableClassInfo If true, scan classfile bytecodes, producing | |
| enableExternalClasses | back to summary |
|---|---|
| public boolean enableExternalClasses If true, allow external classes (classes outside of accepted packages) to be returned in the ScanResult, if they are directly referred to by an accepted class, as a superclass, implemented interface or annotation. Disabled by default. | |
| enableFieldInfo | back to summary |
|---|---|
| public boolean enableFieldInfo If true, enables the saving of field info during the scan. This information can be obtained using
| |
| enableInterClassDependencies | back to summary |
|---|---|
| public boolean enableInterClassDependencies If true, enables the determination of inter-class dependencies. | |
| enableMemoryMapping | back to summary |
|---|---|
| public boolean enableMemoryMapping If true, use a | |
| enableMethodInfo | back to summary |
|---|---|
| public boolean enableMethodInfo If true, enables the saving of method info during the scan. This information can be obtained using
| |
| enableMultiReleaseVersions | back to summary |
|---|---|
| public boolean enableMultiReleaseVersions If true, all multi-release versions of a resource are found. | |
| enableStaticFinalFieldConstantInitializerValues | back to summary |
|---|---|
| public boolean enableStaticFinalFieldConstantInitializerValues Enable the storing of constant initializer values for static final fields in ClassInfo objects. | |
| enableSystemJarsAndModules | back to summary |
|---|---|
| public boolean enableSystemJarsAndModules If true, system jarfiles (rt.jar) and system packages and modules (java.*, jre.*, etc.) should be scanned . | |
| extendScanningUpwardsToExternalClasses | back to summary |
|---|---|
| public boolean extendScanningUpwardsToExternalClasses If true, when classes have superclasses, implemented interfaces or annotations that are external classes, those classes are also scanned. (Even though this slows down scanning a bit, there is no API for disabling this currently, since disabling it can lead to problems -- see #261.) | |
| ignoreClassVisibility | back to summary |
|---|---|
| public boolean ignoreClassVisibility If true, ignore class visibility. If false, classes must be public to be scanned. | |
| ignoreFieldVisibility | back to summary |
|---|---|
| public boolean ignoreFieldVisibility If true, ignore field visibility. If false, fields must be public to be scanned. | |
| ignoreMethodVisibility | back to summary |
|---|---|
| public boolean ignoreMethodVisibility If true, ignore method visibility. If false, methods must be public to be scanned. | |
| ignoreParentClassLoaders | back to summary |
|---|---|
| public boolean ignoreParentClassLoaders If true, do not fetch paths from parent classloaders. | |
| ignoreParentModuleLayers | back to summary |
|---|---|
| public boolean ignoreParentModuleLayers If true, do not scan module layers that are the parent of other module layers. | |
| initializeLoadedClasses | back to summary |
|---|---|
| public boolean initializeLoadedClasses Whether to initialize classes when loading them. | |
| jarAcceptReject | back to summary |
|---|---|
| public AcceptReject. Jar accept/reject criteria (leafname only, ending in ".jar"). | |
| libOrExtJarAcceptReject | back to summary |
|---|---|
| public AcceptReject. lib/ext jar accept/reject criteria (leafname only, ending in ".jar"). | |
| maxBufferedJarRAMSize | back to summary |
|---|---|
| public int maxBufferedJarRAMSize The maximum size of an inner (nested) jar that has been deflated (i.e. compressed, not stored) within an
outer jar, before it has to be spilled to disk rather than stored in a RAM-backed
This is also the maximum size of a jar downloaded from an Default: 64MB (i.e. writing to disk is avoided wherever possible). Setting a lower max RAM size value will decrease ClassGraph's memory usage if either of the above rare situations occurs. | |
| moduleAcceptReject | back to summary |
|---|---|
| public AcceptReject. Module accept/reject criteria (with separator '.'). | |
| modulePathInfo | back to summary |
|---|---|
| public ModulePathInfo modulePathInfo Commandline module path parameters. | |
| overrideClassLoaders | back to summary |
|---|---|
| public transient List<ClassLoader> overrideClassLoaders If non-null, this list of ClassLoaders will be searched instead of the visible/context ClassLoader(s). In particular, this causes ClassGraph to ignore the java.class.path system property. | |
| overrideClasspath | back to summary |
|---|---|
| public List<Object> overrideClasspath If non-null, specifies a list of classpath elements (String, | |
| overrideModuleLayers | back to summary |
|---|---|
| public transient List<Object> overrideModuleLayers If non-null, this list of ModuleLayers will be searched instead of the visible ModuleLayers. | |
| packageAcceptReject | back to summary |
|---|---|
| public AcceptReject. Package accept/reject criteria (with separator '.'). | |
| packagePrefixAcceptReject | back to summary |
|---|---|
| public AcceptReject. Package prefix accept/reject criteria, for recursive scanning (with separator '.', ending in '.'). | |
| pathAcceptReject | back to summary |
|---|---|
| public AcceptReject. Path accept/reject criteria (with separator '/'). | |
| pathPrefixAcceptReject | back to summary |
|---|---|
| public AcceptReject. Path prefix accept/reject criteria, for recursive scanning (with separator '/', ending in '/'). | |
| removeTemporaryFilesAfterScan | back to summary |
|---|---|
| public boolean removeTemporaryFilesAfterScan If true, nested jarfiles (jarfiles within jarfiles) that are extracted during scanning are removed from their
temporary directory (e.g. /tmp/ClassGraph-8JX2u4w) after the scan has completed. If false, temporary files
are removed by the | |
| scanDirs | back to summary |
|---|---|
| public boolean scanDirs If true, scan directories. | |
| scanJars | back to summary |
|---|---|
| public boolean scanJars If true, scan jarfiles. | |
| scanModules | back to summary |
|---|---|
| public boolean scanModules If true, scan modules. | |
| scanNestedJars | back to summary |
|---|---|
| public boolean scanNestedJars If true, scan nested jarfiles (jarfiles within jarfiles). | |
| ScanSpec | back to summary |
|---|---|
| public ScanSpec() Constructor for deserialization. | |
| addClassLoader | back to summary |
|---|---|
| public void addClassLoader(final ClassLoader classLoader) Add a ClassLoader to the list of ClassLoaders to scan. (This only works if overrideClasspath() is not called.)
| |
| addClasspathOverride | back to summary |
|---|---|
| public void addClasspathOverride(final Object overrideClasspathElement) Override the automatically-detected classpath with a custom path. You can specify multiple elements in separate calls, and if this method is called even once, the default classpath will be overridden, such that nothing but the provided classpath will be scanned, i.e. causes ClassLoaders to be ignored, as well as the java.class.path system property.
| |
| addModuleLayer | back to summary |
|---|---|
| public void addModuleLayer(final Object moduleLayer) Add a ModuleLayer to the list of ModuleLayers to scan. Use this method if you define your own ModuleLayer, but the scanning code is not running within that custom ModuleLayer.
This call is ignored if it is called before | |
| classfileIsSpecificallyAccepted | back to summary |
|---|---|
| public boolean classfileIsSpecificallyAccepted(final String relativePath) Returns true if the given relative path (for a classfile name, including ".class") matches a specifically-accepted (and non-rejected) classfile's relative path.
| |
| classOrPackageIsRejected | back to summary |
|---|---|
| public boolean classOrPackageIsRejected(final String className) Returns true if the class is specifically rejected, or is within a rejected package.
| |
| dirAcceptMatchStatus | back to summary |
|---|---|
| public ScanSpec. Returns true if the given directory path is a descendant of a rejected path, or an ancestor or descendant of an accepted path. The path should end in "/".
| |
| enableURLScheme | back to summary |
|---|---|
| public void enableURLScheme(final String scheme) Allow a specified URL scheme in classpath elements.
| |
| filterClasspathElements | back to summary |
|---|---|
| public void filterClasspathElements(final Object filterLambda) Add a classpath element filter. The provided
| |
| isModuleLayer | back to summary |
|---|---|
| private static boolean isModuleLayer(final Object moduleLayer) Return true if the argument is a ModuleLayer or a subclass of ModuleLayer.
| |
| log | back to summary |
|---|---|
| public void log(final LogNode log) Write to log. | |
| overrideClassLoaders | back to summary |
|---|---|
| public void overrideClassLoaders(final ClassLoader... overrideClassLoaders) Completely override the list of ClassLoaders to scan. (This only works if overrideClasspath() is not called.) Causes the java.class.path system property to be ignored.
| |
| overrideModuleLayers | back to summary |
|---|---|
| public void overrideModuleLayers(final Object... overrideModuleLayers) Completely override (and ignore) the visible ModuleLayers, and instead scan the requested ModuleLayers. This call is ignored if overrideClasspath() is called. | |
| sortPrefixes | back to summary |
|---|---|
| public void sortPrefixes() Sort prefixes to ensure correct accept/reject evaluation (see Issue #167). | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ScanSpec. | ANCESTOR_OF_ACCEPTED_PATH
Path is an ancestor of an accepted path. |
| public static final ScanSpec. | AT_ACCEPTED_CLASS_PACKAGE
Path is the package of a specifically-accepted class. |
| public static final ScanSpec. | AT_ACCEPTED_PATH
Path is accepted. |
| public static final ScanSpec. | HAS_ACCEPTED_PATH_PREFIX
Path starts with an accepted path prefix. |
| public static final ScanSpec. | HAS_REJECTED_PATH_PREFIX
Path starts with (or is) a rejected path prefix. |
| public static final ScanSpec. | NOT_WITHIN_ACCEPTED_PATH
Path is not accepted and not rejected. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static ScanSpec. | |
| public static ScanSpec. |
| ANCESTOR_OF_ACCEPTED_PATH | back to summary |
|---|---|
| public static final ScanSpec. Path is an ancestor of an accepted path. | |
| AT_ACCEPTED_CLASS_PACKAGE | back to summary |
|---|---|
| public static final ScanSpec. Path is the package of a specifically-accepted class. | |
| AT_ACCEPTED_PATH | back to summary |
|---|---|
| public static final ScanSpec. Path is accepted. | |
| HAS_ACCEPTED_PATH_PREFIX | back to summary |
|---|---|
| public static final ScanSpec. Path starts with an accepted path prefix. | |
| HAS_REJECTED_PATH_PREFIX | back to summary |
|---|---|
| public static final ScanSpec. Path starts with (or is) a rejected path prefix. | |
| NOT_WITHIN_ACCEPTED_PATH | back to summary |
|---|---|
| public static final ScanSpec. Path is not accepted and not rejected. | |
| ScanSpecPathMatch | back to summary |
|---|---|
| private ScanSpecPathMatch() | |
| valueOf | back to summary |
|---|---|
| public static ScanSpec. | |
| values | back to summary |
|---|---|
| public static ScanSpec. | |