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.
NamespaceHandler, DefaultBeanDefinitionDocumentReader
| Modifier and Type | Field and Description |
|---|---|
| private final ClassLoader | classLoader
ClassLoader to use for NamespaceHandler classes. |
| public static final String | DEFAULT_HANDLER_MAPPINGS_LOCATION
The location to look for the mapping files. |
| private volatile Map | handlerMappings
Stores the mappings from namespace URI to NamespaceHandler class name / instance. |
| private final String | handlerMappingsLocation
Resource location to search for. |
| protected final Log | logger
Logger available to subclasses. |
| Access | Constructor and Description |
|---|---|
| public | DefaultNamespaceHandlerResolver()
Create a new |
| public | DefaultNamespaceHandlerResolver(ClassLoader
the classLoader)ClassLoader instance used to load mapping resources
(may be null, in which case the thread context ClassLoader will be used)Create a new |
| public | DefaultNamespaceHandlerResolver(ClassLoader
the classLoader, String ClassLoader instance used to load mapping resources
may be null, in which case the thread context ClassLoader will be usedthe mapping file location handlerMappingsLocation)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| private Map | |
| public NamespaceHandler | resolve(String
the relevant namespace URI namespaceUri)Implements org. Locate the |
| public String |
| classLoader | back to summary |
|---|---|
| private final ClassLoader classLoader ClassLoader to use for NamespaceHandler classes. | |
| DEFAULT_HANDLER_MAPPINGS_LOCATION | back to summary |
|---|---|
| public static final String DEFAULT_HANDLER_MAPPINGS_LOCATION The location to look for the mapping files. Can be present in multiple JAR files. | |
| handlerMappings | back to summary |
|---|---|
| private volatile Map<String, Object> handlerMappings Stores the mappings from namespace URI to NamespaceHandler class name / instance. | |
| handlerMappingsLocation | back to summary |
|---|---|
| private final String handlerMappingsLocation Resource location to search for. | |
| logger | back to summary |
|---|---|
| protected final Log logger Logger available to subclasses. | |
| DefaultNamespaceHandlerResolver | back to summary |
|---|---|
| public DefaultNamespaceHandlerResolver() Create a new This constructor will result in the thread context ClassLoader being used to load resources.
| |
| DefaultNamespaceHandlerResolver | back to summary |
|---|---|
| public DefaultNamespaceHandlerResolver(ClassLoader classLoader) Create a new
| |
| DefaultNamespaceHandlerResolver | back to summary |
|---|---|
| public DefaultNamespaceHandlerResolver(ClassLoader classLoader, String handlerMappingsLocation) Create a new
| |
| getHandlerMappings | back to summary |
|---|---|
| private Map Load the specified NamespaceHandler mappings lazily. | |
| resolve | back to summary |
|---|---|
| public NamespaceHandler resolve(String namespaceUri) Implements org. Locate the
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |