org.springframework.core.type.classreading.MetadataReader#getResource ( )源码实例Demo

下面列出了org.springframework.core.type.classreading.MetadataReader#getResource ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: spring-analysis-note   文件: ConfigurationClass.java
/**
 * Create a new {@link ConfigurationClass} with the given name.
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param beanName must not be {@code null}
 * @see ConfigurationClass#ConfigurationClass(Class, ConfigurationClass)
 */
public ConfigurationClass(MetadataReader metadataReader, String beanName) {
	Assert.notNull(beanName, "Bean name must not be null");
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.beanName = beanName;
}
 
/**
 * Create a new {@link ConfigurationClass} with the given name.
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param beanName must not be {@code null}
 * @see ConfigurationClass#ConfigurationClass(Class, ConfigurationClass)
 */
public ConfigurationClass(MetadataReader metadataReader, String beanName) {
	Assert.notNull(beanName, "Bean name must not be null");
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.beanName = beanName;
}
 
源代码3 项目: SpringAll   文件: MyTypeFilter.java
@Override
public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) {
    // 获取当前正在扫描的类的注解信息
    AnnotationMetadata annotationMetadata = metadataReader.getAnnotationMetadata();
    // 获取当前正在扫描的类的类信息
    ClassMetadata classMetadata = metadataReader.getClassMetadata();
    // 获取当前正在扫描的类的路径等信息
    Resource resource = metadataReader.getResource();

    String className = classMetadata.getClassName();
    return StringUtils.hasText("er");
}
 
源代码4 项目: lams   文件: ConfigurationClass.java
/**
 * Create a new {@link ConfigurationClass} with the given name.
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param beanName must not be {@code null}
 * @see ConfigurationClass#ConfigurationClass(Class, ConfigurationClass)
 */
public ConfigurationClass(MetadataReader metadataReader, String beanName) {
	Assert.hasText(beanName, "Bean name must not be null");
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.beanName = beanName;
}
 
/**
 * Create a new {@link ConfigurationClass} with the given name.
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param beanName must not be {@code null}
 * @see ConfigurationClass#ConfigurationClass(Class, ConfigurationClass)
 */
public ConfigurationClass(MetadataReader metadataReader, String beanName) {
	Assert.hasText(beanName, "Bean name must not be null");
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.beanName = beanName;
}
 
源代码6 项目: spring-analysis-note   文件: ConfigurationClass.java
/**
 * Create a new {@link ConfigurationClass} representing a class that was imported
 * using the {@link Import} annotation or automatically processed as a nested
 * configuration class (if importedBy is not {@code null}).
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param importedBy the configuration class importing this one or {@code null}
 * @since 3.1.1
 */
public ConfigurationClass(MetadataReader metadataReader, @Nullable ConfigurationClass importedBy) {
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.importedBy.add(importedBy);
}
 
/**
 * Create a new {@link ConfigurationClass} representing a class that was imported
 * using the {@link Import} annotation or automatically processed as a nested
 * configuration class (if importedBy is not {@code null}).
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param importedBy the configuration class importing this one or {@code null}
 * @since 3.1.1
 */
public ConfigurationClass(MetadataReader metadataReader, @Nullable ConfigurationClass importedBy) {
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.importedBy.add(importedBy);
}
 
源代码8 项目: lams   文件: ConfigurationClass.java
/**
 * Create a new {@link ConfigurationClass} representing a class that was imported
 * using the {@link Import} annotation or automatically processed as a nested
 * configuration class (if importedBy is not {@code null}).
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param importedBy the configuration class importing this one or {@code null}
 * @since 3.1.1
 */
public ConfigurationClass(MetadataReader metadataReader, ConfigurationClass importedBy) {
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.importedBy.add(importedBy);
}
 
/**
 * Create a new {@link ConfigurationClass} representing a class that was imported
 * using the {@link Import} annotation or automatically processed as a nested
 * configuration class (if importedBy is not {@code null}).
 * @param metadataReader reader used to parse the underlying {@link Class}
 * @param importedBy the configuration class importing this one or {@code null}
 * @since 3.1.1
 */
public ConfigurationClass(MetadataReader metadataReader, ConfigurationClass importedBy) {
	this.metadata = metadataReader.getAnnotationMetadata();
	this.resource = metadataReader.getResource();
	this.importedBy.add(importedBy);
}