org.springframework.core.type.classreading
Class SimpleMetadataReader

java.lang.Object
  extended by org.springframework.core.type.classreading.SimpleMetadataReader
All Implemented Interfaces:
MetadataReader

final class SimpleMetadataReader
extends java.lang.Object
implements MetadataReader

MetadataReader implementation based on an ASM org.springframework.asm.ClassReader.

Package-visible in order to allow for repackaging the ASM library without effect on users of the core.type package.

Since:
2.5
Author:
Juergen Hoeller, Costin Leau

Field Summary
private  AnnotationMetadata annotationMetadata
           
private  ClassMetadata classMetadata
           
private  Resource resource
           
 
Constructor Summary
SimpleMetadataReader(Resource resource, java.lang.ClassLoader classLoader)
           
 
Method Summary
 AnnotationMetadata getAnnotationMetadata()
          Read full annotation metadata for the underlying class, including metadata for annotated methods.
 ClassMetadata getClassMetadata()
          Read basic class metadata for the underlying class.
 Resource getResource()
          Return the resource reference for the class file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resource

private final Resource resource

classMetadata

private final ClassMetadata classMetadata

annotationMetadata

private final AnnotationMetadata annotationMetadata
Constructor Detail

SimpleMetadataReader

SimpleMetadataReader(Resource resource,
                     java.lang.ClassLoader classLoader)
               throws java.io.IOException
Throws:
java.io.IOException
Method Detail

getResource

public Resource getResource()
Description copied from interface: MetadataReader
Return the resource reference for the class file.

Specified by:
getResource in interface MetadataReader

getClassMetadata

public ClassMetadata getClassMetadata()
Description copied from interface: MetadataReader
Read basic class metadata for the underlying class.

Specified by:
getClassMetadata in interface MetadataReader

getAnnotationMetadata

public AnnotationMetadata getAnnotationMetadata()
Description copied from interface: MetadataReader
Read full annotation metadata for the underlying class, including metadata for annotated methods.

Specified by:
getAnnotationMetadata in interface MetadataReader