Example usage for org.springframework.core.type AnnotationMetadata isConcrete

List of usage examples for org.springframework.core.type AnnotationMetadata isConcrete

Introduction

In this page you can find the example usage for org.springframework.core.type AnnotationMetadata isConcrete.

Prototype

default boolean isConcrete() 

Source Link

Document

Return whether the underlying class represents a concrete class, i.e.

Usage

From source file:org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.java

/**
 * Determine whether the given bean definition qualifies as candidate.
 * <p>The default implementation checks whether the class is not an interface
 * and not dependent on an enclosing class.
 * <p>Can be overridden in subclasses.
 * @param beanDefinition the bean definition to check
 * @return whether the bean definition qualifies as a candidate component
 *///from   w ww .  ja  v a2  s. co m
protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
    AnnotationMetadata metadata = beanDefinition.getMetadata();
    return (metadata.isIndependent() && (metadata.isConcrete()
            || (metadata.isAbstract() && metadata.hasAnnotatedMethods(Lookup.class.getName()))));
}