org.springframework.core.type.classreading

## 类 SimpleMetadataReaderFactory

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

- 所有已实现的接口:
    MetadataReaderFactory
  直接已知子类:
    CachingMetadataReaderFactory

      public class SimpleMetadataReaderFactory
      extends Object
      implements MetadataReaderFactory

  Simple implementation of the `MetadataReaderFactory` interface, creating a new ASM `ClassReader` for every request.
  从以下版本开始:
    2.5
  作者:
    Juergen Hoeller

- - ### 构造器概要

    构造器
    构造器和说明
    `SimpleMetadataReaderFactory()` Create a new SimpleMetadataReaderFactory for the default class loader.
    `SimpleMetadataReaderFactory(ClassLoader classLoader)` Create a new SimpleMetadataReaderFactory for the given class loader.
    `SimpleMetadataReaderFactory(ResourceLoader resourceLoader)` Create a new SimpleMetadataReaderFactory for the given resource loader.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `MetadataReader` | `getMetadataReader(Resource resource)` Obtain a MetadataReader for the given resource.
    `MetadataReader` | `getMetadataReader(String className)` Obtain a MetadataReader for the given class name.
    `ResourceLoader` | `getResourceLoader()` Return the ResourceLoader that this MetadataReaderFactory has been constructed with.

    - ### 从类继承的方法 java.lang.Object

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

- - ### 构造器详细资料

    - #### SimpleMetadataReaderFactory

          public SimpleMetadataReaderFactory()

      Create a new SimpleMetadataReaderFactory for the default class loader.

    - #### SimpleMetadataReaderFactory

          public SimpleMetadataReaderFactory(@Nullable
                                             ResourceLoader resourceLoader)

      Create a new SimpleMetadataReaderFactory for the given resource loader.
      参数:
        `resourceLoader` - the Spring ResourceLoader to use (also determines the ClassLoader to use)

    - #### SimpleMetadataReaderFactory

          public SimpleMetadataReaderFactory(@Nullable
                                             ClassLoader classLoader)

      Create a new SimpleMetadataReaderFactory for the given class loader.
      参数:
        `classLoader` - the ClassLoader to use

  - ### 方法详细资料

    - #### getResourceLoader

          public final ResourceLoader getResourceLoader()

      Return the ResourceLoader that this MetadataReaderFactory has been constructed with.

    - #### getMetadataReader

          public MetadataReader getMetadataReader(String className)
                                           throws IOException

      从接口复制的说明: `MetadataReaderFactory`
      Obtain a MetadataReader for the given class name.
      指定者:
        `getMetadataReader` 在接口中 `MetadataReaderFactory`
      参数:
        `className` - the class name (to be resolved to a ".class" file)
      返回:
        a holder for the ClassReader instance (never `null`)
      抛出:
        `IOException` - in case of I/O failure

    - #### getMetadataReader

          public MetadataReader getMetadataReader(Resource resource)
                                           throws IOException

      从接口复制的说明: `MetadataReaderFactory`
      Obtain a MetadataReader for the given resource.
      指定者:
        `getMetadataReader` 在接口中 `MetadataReaderFactory`
      参数:
        `resource` - the resource (pointing to a ".class" file)
      返回:
        a holder for the ClassReader instance (never `null`)
      抛出:
        `IOException` - in case of I/O failure