public class

DefaultNamespaceHandlerResolver

extends Object
implements NamespaceHandlerResolver
java.lang.Object
   ↳ org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver

Class Overview

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.

Summary

Constants
String DEFAULT_HANDLER_MAPPINGS_LOCATION The location to look for the mapping files.
Fields
protected final Log logger Logger available to subclasses
Public Constructors
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.
Public Methods
NamespaceHandler resolve(String namespaceUri)
Locate the NamespaceHandler for the supplied namespace URI from the configured mappings.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.springframework.beans.factory.xml.NamespaceHandlerResolver

Constants

public static final String DEFAULT_HANDLER_MAPPINGS_LOCATION

Also: SpringBeans

The location to look for the mapping files. Can be present in multiple JAR files.

Constant Value: "META-INF/spring.handlers"

Fields

protected final Log logger

Also: SpringBeans

Logger available to subclasses

Public Constructors

public DefaultNamespaceHandlerResolver ()

Also: SpringBeans

Create a new DefaultNamespaceHandlerResolver using the default mapping file location.

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

public DefaultNamespaceHandlerResolver (ClassLoader classLoader)

Also: SpringBeans

Create a new DefaultNamespaceHandlerResolver using the default mapping file location.

Parameters
classLoader the ClassLoader instance used to load mapping resources (may be null, in which case the thread context ClassLoader will be used)

public DefaultNamespaceHandlerResolver (ClassLoader classLoader, String handlerMappingsLocation)

Also: SpringBeans

Create a new DefaultNamespaceHandlerResolver using the supplied mapping file location.

Parameters
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

Public Methods

public NamespaceHandler resolve (String namespaceUri)

Also: SpringBeans

Locate the NamespaceHandler for the supplied namespace URI from the configured mappings.

Parameters
namespaceUri the relevant namespace URI
Returns

public String toString ()