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

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

Introduction

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

Prototype

default boolean hasMetaAnnotation(String metaAnnotationName) 

Source Link

Document

Determine whether the underlying class has an annotation that is itself annotated with the meta-annotation of the given type.

Usage

From source file:br.com.caelum.vraptor.ioc.spring.ComponentTypeFilter.java

public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory)
        throws IOException {
    AnnotationMetadata metadata = metadataReader.getAnnotationMetadata();
    for (Class<? extends Annotation> annotationType : annotationTypes) {
        if (metadata.hasAnnotation(annotationType.getName())) {
            return true;
        }//from  w  w  w.ja v  a 2  s  . com
    }
    return metadata.hasMetaAnnotation(Stereotype.class.getName());
}