类 AnnotatedClassFinder
java.lang.Object
cn.taketoday.framework.test.context.AnnotatedClassFinder
Utility class to find a class annotated with a particular annotation in a hierarchy.
- 从以下版本开始:
- 4.0
- 作者:
- Phillip Webb, Artsiom Yudovin, Stephane Nicoll, Harry Yang
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final Class<? extends Annotation>private final cn.taketoday.context.annotation.ClassPathScanningCandidateComponentProvider -
构造器概要
构造器构造器说明AnnotatedClassFinder(Class<? extends Annotation> annotationType) Create a new instance with theannotationTypeto find. -
方法概要
修饰符和类型方法说明Class<?>findFromClass(Class<?> source) Find the firstClassthat is annotated with the target annotation, starting from the package defined by the givensourceup to the root.Class<?>findFromPackage(String source) Find the firstClassthat is annotated with the target annotation, starting from the package defined by the givensourceup to the root.private StringgetParentPackage(String sourcePackage) private Class<?>scanPackage(String source)
-
字段详细资料
-
cache
-
annotationType
-
scanner
private final cn.taketoday.context.annotation.ClassPathScanningCandidateComponentProvider scanner
-
-
构造器详细资料
-
AnnotatedClassFinder
Create a new instance with theannotationTypeto find.- 参数:
annotationType- the annotation to find
-
-
方法详细资料
-
findFromClass
Find the firstClassthat is annotated with the target annotation, starting from the package defined by the givensourceup to the root.- 参数:
source- the source class to use to initiate the search- 返回:
- the first
Classannotated with the target annotation within the hierarchy defined by the givensourceornullif none is found.
-
findFromPackage
Find the firstClassthat is annotated with the target annotation, starting from the package defined by the givensourceup to the root.- 参数:
source- the source package to use to initiate the search- 返回:
- the first
Classannotated with the target annotation within the hierarchy defined by the givensourceornullif none is found.
-
scanPackage
-
getParentPackage
-