org.springframework.data.type.classreading

## Class MethodsMetadataReaderFactory

- java.lang.Object
- - org.springframework.core.type.classreading.SimpleMetadataReaderFactory
  - - org.springframework.data.type.classreading.MethodsMetadataReaderFactory

All Implemented Interfaces:
  MetadataReaderFactory

    public class MethodsMetadataReaderFactory
    extends SimpleMetadataReaderFactory

Extension of `SimpleMetadataReaderFactory` that reads `MethodsMetadata`, creating a new ASM `MethodsMetadataReader` for every request.

Since:
  2.1
Author:
  Mark Paluch

### Constructor Summary

Constructors
Constructor and Description
`MethodsMetadataReaderFactory()` Create a new `MethodsMetadataReaderFactory` for the default class loader.
`MethodsMetadataReaderFactory(ClassLoader classLoader)` Create a new `MethodsMetadataReaderFactory` for the given `ClassLoader`.
`MethodsMetadataReaderFactory(ResourceLoader resourceLoader)` Create a new `MethodsMetadataReaderFactory` for the given `ResourceLoader`.

### Method Summary

All Methods Instance Methods Concrete Methods
`MethodsMetadataReader` `getMetadataReader(Resource resource)`
`MethodsMetadataReader` `getMetadataReader(String className)`

### Methods inherited from class org.springframework.core.type.classreading.SimpleMetadataReaderFactory

`getResourceLoader`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### MethodsMetadataReaderFactory

    public MethodsMetadataReaderFactory()

Create a new `MethodsMetadataReaderFactory` for the default class loader.

#### MethodsMetadataReaderFactory

    public MethodsMetadataReaderFactory(@Nullable
                                        ResourceLoader resourceLoader)

Create a new `MethodsMetadataReaderFactory` for the given `ResourceLoader`.

Parameters:
  `resourceLoader` - the Spring `ResourceLoader` to use (also determines the `ClassLoader` to use).

#### MethodsMetadataReaderFactory

    public MethodsMetadataReaderFactory(@Nullable
                                        ClassLoader classLoader)

Create a new `MethodsMetadataReaderFactory` for the given `ClassLoader`.

Parameters:
  `classLoader` - the class loader to use.

### Method Detail

#### getMetadataReader

    public MethodsMetadataReader getMetadataReader(String className)
                                            throws IOException

Specified by:
  `getMetadataReader` in interface `MetadataReaderFactory`
Overrides:
  `getMetadataReader` in class `SimpleMetadataReaderFactory`
Throws:
  `IOException`

#### getMetadataReader

    public MethodsMetadataReader getMetadataReader(Resource resource)
                                            throws IOException

Specified by:
  `getMetadataReader` in interface `MetadataReaderFactory`
Overrides:
  `getMetadataReader` in class `SimpleMetadataReaderFactory`
Throws:
  `IOException`