@groovy.util.logging.Slf4j @groovy.transform.CompileStatic class ClassPathScanner extends java.lang.Object
Used to scan for classes on the classpath in the most efficient manner possible. WARNING: Classpath scanning can be expensive! Use with care.
Modifiers | Name | Description |
---|---|---|
private static class |
ClassPathScanner.ApplicationRelativeClassLoader |
|
private static class |
ClassPathScanner.GrailsClasspathIgnoringResourceResolver |
Modifiers | Name | Description |
---|---|---|
private static java.util.List |
DEFAULT_IGNORED_ROOT_PACKAGES |
Constructor and description |
---|
ClassPathScanner
() |
Type Params | Return Type | Name and description |
---|---|---|
|
protected java.util.List |
ignoredRootPackages()
|
|
protected boolean |
isExcluded(org.springframework.core.io.Resource res) Whether the given resource is excluded |
|
java.util.Set<java.lang.Class> |
scan(java.lang.Class applicationClass) Scans for classes relative to the given class |
|
java.util.Set<java.lang.Class> |
scan(java.lang.Class applicationClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotationFilter) Scans for classes relative to the given class |
|
java.util.Set<java.lang.Class> |
scan(java.lang.Class applicationClass, groovy.lang.Closure<java.lang.Boolean> annotationFilter) Scans for classes relative to the given class |
|
java.util.Set<java.lang.Class> |
scan(java.lang.Class applicationClass, java.util.Collection<java.lang.String> packageNames, java.lang.Class<? extends java.lang.annotation.Annotation> annotationFilter) Scans for classes relative to the given class |
|
java.util.Set<java.lang.Class> |
scan(java.lang.Class applicationClass, java.util.Collection<java.lang.String> packageNames, groovy.lang.Closure<java.lang.Boolean> annotationFilter) Scans for classes relative to the given class |
|
java.util.Set<java.lang.Class> |
scan(org.springframework.core.io.support.ResourcePatternResolver resourcePatternResolver, java.util.Collection<java.lang.String> packageNames, groovy.lang.Closure<java.lang.Boolean> annotationFilter) Scans for classes in the given package names |
|
java.util.Set<java.lang.Class> |
scan(java.lang.ClassLoader classLoader, org.springframework.core.io.support.ResourcePatternResolver resourcePatternResolver, java.util.Collection<java.lang.String> packageNames, groovy.lang.Closure<java.lang.Boolean> annotationFilter) Scans for classes in the given package names |
|
private void |
scanUsingPattern(org.springframework.core.io.support.ResourcePatternResolver resourcePatternResolver, java.lang.String pattern, java.lang.ClassLoader classLoader, groovy.lang.Closure<java.lang.Boolean> annotationFilter, java.util.Set<java.lang.Class> classes) |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Whether the given resource is excluded
res
- The resourceScans for classes relative to the given class
applicationClass
- The class, usually the Application classScans for classes relative to the given class
applicationClass
- The class, usually the Application classannotationFilter
- The annotation to filter byScans for classes relative to the given class
applicationClass
- The class, usually the Application classannotationFilter
- The annotation to filter byScans for classes relative to the given class
applicationClass
- The class, usually the Application classpackageNames
- The package names to scanannotationFilter
- The annotation to filter byScans for classes relative to the given class
applicationClass
- The class, usually the Application classpackageNames
- The package names to scanScans for classes in the given package names
resourcePatternResolver
- The resolver to usepackageNames
- The package namesScans for classes in the given package names
classLoader
- The classloader to use to load classesresourcePatternResolver
- The resolverpackageNames
- The package namesannotationFilter
- The filter