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

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

Introduction

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

Prototype

boolean isAbstract();

Source Link

Document

Return whether the underlying class is marked as abstract.

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
 *//* w  ww .j  a  v  a  2  s.c o  m*/
protected boolean isCandidateComponent(AnnotatedBeanDefinition beanDefinition) {
    AnnotationMetadata metadata = beanDefinition.getMetadata();
    return (metadata.isIndependent() && (metadata.isConcrete()
            || (metadata.isAbstract() && metadata.hasAnnotatedMethods(Lookup.class.getName()))));
}