Example usage for org.springframework.beans.factory.annotation AnnotatedBeanDefinition getBeanClassName

List of usage examples for org.springframework.beans.factory.annotation AnnotatedBeanDefinition getBeanClassName

Introduction

In this page you can find the example usage for org.springframework.beans.factory.annotation AnnotatedBeanDefinition getBeanClassName.

Prototype

@Nullable
String getBeanClassName();

Source Link

Document

Return the current bean class name of this bean definition.

Usage

From source file:me.yanaga.winter.data.jpa.spring.config.RepositoryComponentProvider.java

@Override
protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
    boolean isNonRepositoryInterface = !Repository.class.getName().equals(beanDefinition.getBeanClassName());
    boolean isTopLevelType = !beanDefinition.getMetadata().hasEnclosingClass();
    return isNonRepositoryInterface && isTopLevelType;
}

From source file:org.devproof.portal.core.config.factory.DevproofClassPathBeanDefinitionScanner.java

@Override
protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
    try {//w w  w  .j  a  va  2 s.co m
        Class<?> clazz = Class.forName(beanDefinition.getBeanClassName());
        return super.isCandidateComponent(beanDefinition) || clazz.isAnnotationPresent(GenericRepository.class)
                || clazz.isAnnotationPresent(RegisterGenericDataProvider.class);
    } catch (ClassNotFoundException e) {
        logger.fatal(e);
    }
    return super.isCandidateComponent(beanDefinition);
}