public class

SimpleMetadataReaderFactory

extends Object
implements MetadataReaderFactory
java.lang.Object
   ↳ org.springframework.core.type.classreading.SimpleMetadataReaderFactory
Known Direct Subclasses

Class Overview

Simple implementation of the MetadataReaderFactory interface, creating a new ASM org.springframework.asm.ClassReader for every request.

Summary

Public Constructors
SimpleMetadataReaderFactory()
Create a new SimpleMetadataReaderFactory for the default class loader.
SimpleMetadataReaderFactory(ResourceLoader resourceLoader)
Create a new SimpleMetadataReaderFactory for the given resource loader.
SimpleMetadataReaderFactory(ClassLoader classLoader)
Create a new SimpleMetadataReaderFactory for the given class loader.
Public Methods
MetadataReader getMetadataReader(Resource resource)
Obtain a MetadataReader for the given resource.
MetadataReader getMetadataReader(String className)
Obtain a MetadataReader for the given class name.
final ResourceLoader getResourceLoader()
Return the ResourceLoader that this MetadataReaderFactory has been constructed with.
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.core.type.classreading.MetadataReaderFactory

Public Constructors

public SimpleMetadataReaderFactory ()

Also: SpringCore

Create a new SimpleMetadataReaderFactory for the default class loader.

public SimpleMetadataReaderFactory (ResourceLoader resourceLoader)

Also: SpringCore

Create a new SimpleMetadataReaderFactory for the given resource loader.

Parameters
resourceLoader the Spring ResourceLoader to use (also determines the ClassLoader to use)

public SimpleMetadataReaderFactory (ClassLoader classLoader)

Also: SpringCore

Create a new SimpleMetadataReaderFactory for the given class loader.

Parameters
classLoader the ClassLoader to use

Public Methods

public MetadataReader getMetadataReader (Resource resource)

Also: SpringCore

Obtain a MetadataReader for the given resource.

Parameters
resource the resource (pointing to a ".class" file)
Returns
  • a holder for the ClassReader instance (never null)
Throws
IOException

public MetadataReader getMetadataReader (String className)

Also: SpringCore

Obtain a MetadataReader for the given class name.

Parameters
className the class name (to be resolved to a ".class" file)
Returns
  • a holder for the ClassReader instance (never null)
Throws
IOException

public final ResourceLoader getResourceLoader ()

Also: SpringCore

Return the ResourceLoader that this MetadataReaderFactory has been constructed with.