Package org.springframework.data.util
Class AnnotatedTypeScanner
java.lang.Object
org.springframework.data.util.AnnotatedTypeScanner
- All Implemented Interfaces:
Aware
,EnvironmentAware
,ResourceLoaderAware
Scanner to find types with annotations on the classpath.
- Author:
- Oliver Gierke, Christoph Strobl, Johannes Englmeier
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotatedTypeScanner
(boolean considerInterfaces, Class<? extends Annotation>... annotationTypes) Creates a newAnnotatedTypeScanner
for the given annotation types.AnnotatedTypeScanner
(boolean considerInterfaces, Collection<Class<? extends Annotation>> annotationTypes) AnnotatedTypeScanner
(Class<? extends Annotation>... annotationTypes) Creates a newAnnotatedTypeScanner
for the given annotation types. -
Method Summary
Modifier and TypeMethodDescriptionvoid
setEnvironment
(Environment environment) void
setResourceLoader
(ResourceLoader resourceLoader)
-
Constructor Details
-
AnnotatedTypeScanner
Creates a newAnnotatedTypeScanner
for the given annotation types.- Parameters:
annotationTypes
- the annotation types to scan for.
-
AnnotatedTypeScanner
@SafeVarargs public AnnotatedTypeScanner(boolean considerInterfaces, Class<? extends Annotation>... annotationTypes) Creates a newAnnotatedTypeScanner
for the given annotation types.- Parameters:
considerInterfaces
- whether to consider interfaces as well.annotationTypes
- the annotations to scan for.
-
AnnotatedTypeScanner
public AnnotatedTypeScanner(boolean considerInterfaces, Collection<Class<? extends Annotation>> annotationTypes) - Parameters:
considerInterfaces
-annotationTypes
-- Since:
- 3.0
-
-
Method Details
-
setResourceLoader
- Specified by:
setResourceLoader
in interfaceResourceLoaderAware
-
setEnvironment
- Specified by:
setEnvironment
in interfaceEnvironmentAware
-
findTypes
-
findTypes
-