org.springframework.beans.factory.xml

## 类 DefaultNamespaceHandlerResolver

- java.lang.Object
- - org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver

- 所有已实现的接口:
    NamespaceHandlerResolver

      public class DefaultNamespaceHandlerResolver
      extends Object
      implements NamespaceHandlerResolver

  Default implementation of the `NamespaceHandlerResolver` interface. Resolves namespace URIs to implementation classes based on the mappings contained in mapping file.

  By default, this implementation looks for the mapping file at `META-INF/spring.handlers`, but this can be changed using the `DefaultNamespaceHandlerResolver(ClassLoader, String)` constructor.

  从以下版本开始:
    2.0
  作者:
    Rob Harrop, Juergen Hoeller
  另请参阅:
    `NamespaceHandler`, `DefaultBeanDefinitionDocumentReader`

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static String` | `DEFAULT_HANDLER_MAPPINGS_LOCATION` The location to look for the mapping files.
    `protected Log` | `logger` Logger available to subclasses

  - ### 构造器概要

    构造器
    构造器和说明
    `DefaultNamespaceHandlerResolver()` Create a new `DefaultNamespaceHandlerResolver` using the default mapping file location.
    `DefaultNamespaceHandlerResolver(ClassLoader classLoader)` Create a new `DefaultNamespaceHandlerResolver` using the default mapping file location.
    `DefaultNamespaceHandlerResolver(ClassLoader classLoader, String handlerMappingsLocation)` Create a new `DefaultNamespaceHandlerResolver` using the supplied mapping file location.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `NamespaceHandler` | `resolve(String namespaceUri)` Locate the `NamespaceHandler` for the supplied namespace URI from the configured mappings.
    `String` | `toString()`

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

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

- - ### 字段详细资料

    - #### DEFAULT_HANDLER_MAPPINGS_LOCATION

          public static final String DEFAULT_HANDLER_MAPPINGS_LOCATION

      The location to look for the mapping files. Can be present in multiple JAR files.
      另请参阅:
        常量字段值

    - #### logger

          protected final Log logger

      Logger available to subclasses

  - ### 构造器详细资料

    - #### DefaultNamespaceHandlerResolver

          public DefaultNamespaceHandlerResolver()

      Create a new `DefaultNamespaceHandlerResolver` using the default mapping file location.

      This constructor will result in the thread context ClassLoader being used to load resources.

      另请参阅:
        `DEFAULT_HANDLER_MAPPINGS_LOCATION`

    - #### DefaultNamespaceHandlerResolver

          public DefaultNamespaceHandlerResolver(@Nullable
                                                 ClassLoader classLoader)

      Create a new `DefaultNamespaceHandlerResolver` using the default mapping file location.
      参数:
        `classLoader` - the `ClassLoader` instance used to load mapping resources (may be `null`, in which case the thread context ClassLoader will be used)
      另请参阅:
        `DEFAULT_HANDLER_MAPPINGS_LOCATION`

    - #### DefaultNamespaceHandlerResolver

          public DefaultNamespaceHandlerResolver(@Nullable
                                                 ClassLoader classLoader,
                                                 String handlerMappingsLocation)

      Create a new `DefaultNamespaceHandlerResolver` using the supplied mapping file location.
      参数:
        `classLoader` - the `ClassLoader` instance used to load mapping resources may be `null`, in which case the thread context ClassLoader will be used)
        `handlerMappingsLocation` - the mapping file location

  - ### 方法详细资料

    - #### resolve

          @Nullable
          public NamespaceHandler resolve(String namespaceUri)

      Locate the `NamespaceHandler` for the supplied namespace URI from the configured mappings.
      指定者:
        `resolve` 在接口中 `NamespaceHandlerResolver`
      参数:
        `namespaceUri` - the relevant namespace URI
      返回:
        the located `NamespaceHandler`, or `null` if none found

    - #### toString

          public String toString()

      覆盖:
        `toString` 在类中 `Object`