public final class TypeFilterFactories extends Object
TypeFilter,
ClassPathScanner,
ClassPathScannerBuilder| 限定符和类型 | 类和说明 |
|---|---|
static class |
TypeFilterFactories.Quiet |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.springframework.core.type.filter.TypeFilter |
all(org.springframework.core.type.filter.TypeFilter... filters)
被装饰的所有TypeFilter任意一个返回false,整体返回false,否则返回true
|
static org.springframework.core.type.filter.TypeFilter |
alwaysFalse()
总是返回false的TypeFilter
|
static org.springframework.core.type.filter.TypeFilter |
alwaysTrue()
总是返回true的TypeFilter
|
static org.springframework.core.type.filter.TypeFilter |
and(org.springframework.core.type.filter.TypeFilter f1,
org.springframework.core.type.filter.TypeFilter f2)
逻辑与
|
static org.springframework.core.type.filter.TypeFilter |
annotation(Class<? extends Annotation> annotationType)
通过元注释来过滤类型
|
static org.springframework.core.type.filter.TypeFilter |
annotation(Class<? extends Annotation> annotationType,
boolean considerMetaAnnotations,
boolean considerInterfaces)
通过元注释来过滤类型
|
static org.springframework.core.type.filter.TypeFilter |
any(org.springframework.core.type.filter.TypeFilter... filters)
被装饰的所有TypeFilter任意一个返回true,整体返回true,否则返回false
|
static org.springframework.core.type.filter.TypeFilter |
assignable(Class<?> targetType)
通过可赋值性过滤类型
|
static org.springframework.core.type.filter.TypeFilter |
fullyQualifiedClassName(String className)
通过类名过滤类型
|
static org.springframework.core.type.filter.TypeFilter |
hasSuperClass()
过滤有父类型的类型
|
static org.springframework.core.type.filter.TypeFilter |
implementsInterface(Class<?> interfaceType)
过滤实现了指定接口的类型
|
static org.springframework.core.type.filter.TypeFilter |
isAbstract()
过滤抽象的类型。
|
static org.springframework.core.type.filter.TypeFilter |
isAnnotation()
过滤是元数据的类型
|
static org.springframework.core.type.filter.TypeFilter |
isConcrete()
过滤具象的类型
|
static org.springframework.core.type.filter.TypeFilter |
isFinal()
过滤是Final的类型
|
static org.springframework.core.type.filter.TypeFilter |
isIndependent()
过滤是顶级类型或静态内部类
|
static org.springframework.core.type.filter.TypeFilter |
isInnerClass()
过滤内部类的类型
|
static org.springframework.core.type.filter.TypeFilter |
isInterface()
过滤是接口的类型
|
static org.springframework.core.type.filter.TypeFilter |
not(org.springframework.core.type.filter.TypeFilter typeFilter)
逻辑取反
|
static org.springframework.core.type.filter.TypeFilter |
or(org.springframework.core.type.filter.TypeFilter f1,
org.springframework.core.type.filter.TypeFilter f2)
逻辑或
|
static org.springframework.core.type.filter.TypeFilter |
quiet(org.springframework.core.type.filter.TypeFilter filter,
boolean resultIfError)
装饰TypeFilter并吞掉IOException
|
static org.springframework.core.type.filter.TypeFilter |
regexPattern(String regex)
通过正则表达式匹配fully-qualified class name过滤类型
|
public static org.springframework.core.type.filter.TypeFilter annotation(Class<? extends Annotation> annotationType)
annotationType - 元注释类型public static org.springframework.core.type.filter.TypeFilter annotation(Class<? extends Annotation> annotationType, boolean considerMetaAnnotations, boolean considerInterfaces)
annotationType - 元注释类型considerMetaAnnotations - 考虑Meta元注释的情形considerInterfaces - 考虑元注释在接口上而不仅仅在实现类上的情形public static org.springframework.core.type.filter.TypeFilter assignable(Class<?> targetType)
targetType - 赋值目标类型public static org.springframework.core.type.filter.TypeFilter fullyQualifiedClassName(String className)
className - 指定的类型public static org.springframework.core.type.filter.TypeFilter regexPattern(String regex)
regex - 正则表达式public static org.springframework.core.type.filter.TypeFilter isInterface()
public static org.springframework.core.type.filter.TypeFilter isAbstract()
public static org.springframework.core.type.filter.TypeFilter isConcrete()
public static org.springframework.core.type.filter.TypeFilter isAnnotation()
public static org.springframework.core.type.filter.TypeFilter isFinal()
public static org.springframework.core.type.filter.TypeFilter isIndependent()
public static org.springframework.core.type.filter.TypeFilter hasSuperClass()
public static org.springframework.core.type.filter.TypeFilter isInnerClass()
public static org.springframework.core.type.filter.TypeFilter implementsInterface(Class<?> interfaceType)
interfaceType - 指定接口public static org.springframework.core.type.filter.TypeFilter not(org.springframework.core.type.filter.TypeFilter typeFilter)
typeFilter - 代理的TypeFilter实例public static org.springframework.core.type.filter.TypeFilter or(org.springframework.core.type.filter.TypeFilter f1,
org.springframework.core.type.filter.TypeFilter f2)
f1 - 实例1f2 - 实例2public static org.springframework.core.type.filter.TypeFilter and(org.springframework.core.type.filter.TypeFilter f1,
org.springframework.core.type.filter.TypeFilter f2)
f1 - 实例1f2 - 实例2public static org.springframework.core.type.filter.TypeFilter any(org.springframework.core.type.filter.TypeFilter... filters)
filters - 代理的TypeFilter实例public static org.springframework.core.type.filter.TypeFilter all(org.springframework.core.type.filter.TypeFilter... filters)
filters - 代理的TypeFilter实例public static org.springframework.core.type.filter.TypeFilter alwaysTrue()
public static org.springframework.core.type.filter.TypeFilter alwaysFalse()
public static org.springframework.core.type.filter.TypeFilter quiet(org.springframework.core.type.filter.TypeFilter filter,
boolean resultIfError)
filter - 代理的TypeFilter实例resultIfError - 发生IOException时的返回值Copyright © 2022. All rights reserved.