Class AnnotationMetadataReader

  • All Implemented Interfaces:
    org.springframework.core.type.classreading.MetadataReader

    public class AnnotationMetadataReader
    extends java.lang.Object
    implements org.springframework.core.type.classreading.MetadataReader
    A more limited version of Spring's annotation reader that only reads annotations on classes
    Since:
    3.1.13
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationMetadataReader​(org.springframework.core.io.Resource resource, java.lang.ClassLoader classLoader)
      Reads only the annotation names from a class resource
      AnnotationMetadataReader​(org.springframework.core.io.Resource resource, java.lang.ClassLoader classLoader, boolean readAttributeValues)
      Constructs a new annotation metadata reader
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.core.type.AnnotationMetadata getAnnotationMetadata()  
      org.springframework.core.type.ClassMetadata getClassMetadata()  
      org.springframework.core.io.Resource getResource()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AnnotationMetadataReader

        public AnnotationMetadataReader​(org.springframework.core.io.Resource resource,
                                        java.lang.ClassLoader classLoader)
                                 throws java.io.IOException
        Reads only the annotation names from a class resource
        Parameters:
        resource - The resource
        classLoader - The classloader
        Throws:
        java.io.IOException
      • AnnotationMetadataReader

        public AnnotationMetadataReader​(org.springframework.core.io.Resource resource,
                                        java.lang.ClassLoader classLoader,
                                        boolean readAttributeValues)
                                 throws java.io.IOException
        Constructs a new annotation metadata reader
        Parameters:
        resource - The resource
        classLoader - The classloader
        readAttributeValues - Whether to read the attributes in addition or just the annotation class names
        Throws:
        java.io.IOException
    • Method Detail

      • getResource

        public org.springframework.core.io.Resource getResource()
        Specified by:
        getResource in interface org.springframework.core.type.classreading.MetadataReader
      • getClassMetadata

        public org.springframework.core.type.ClassMetadata getClassMetadata()
        Specified by:
        getClassMetadata in interface org.springframework.core.type.classreading.MetadataReader
      • getAnnotationMetadata

        public org.springframework.core.type.AnnotationMetadata getAnnotationMetadata()
        Specified by:
        getAnnotationMetadata in interface org.springframework.core.type.classreading.MetadataReader