类org.springframework.boot.context.TypeExcludeFilter源码实例Demo

下面列出了怎么用org.springframework.boot.context.TypeExcludeFilter的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: spring-init   文件: SimpleConditionService.java
@Override
public boolean includes(Class<?> type) {
	if (!EXCLUDES_ENABLED) {
		return true;
	}
	// TODO: split this method off into a test component?
	if (beanFactory.containsSingleton(EXCLUDE_FILTER_BEAN_NAME)) {
		TypeExcludeFilter filter = (TypeExcludeFilter) beanFactory.getSingleton(EXCLUDE_FILTER_BEAN_NAME);
		try {
			if (filter.match(metadataReaderFactory.getMetadataReader(type.getName()), metadataReaderFactory)) {
				return false;
			}
		}
		catch (IOException e) {
			throw new IllegalStateException("Cannot read metadata for " + type);
		}
	}
	return true;
}
 
 类所在包
 类方法
 同包方法