public interface ParserConfigurator
This is designed as a fluent interface for ease of use, so implementing classes should respect
that and return this
and not a new instance of ParserConfigurator
on all setXXX
methods.
Modifier and Type | Method and Description |
---|---|
ParserConfigurator |
addProperties(Map<String,Object> properties)
Adds a collection of properties with the given key-value mappings for the underlying parser.
|
ParserConfigurator |
addProperty(String key,
Object val)
Adds a property with the given key and value for the underlying parser to use.
|
XmlAdapter |
getAdapter()
Gets XML-specific adapter.
|
ClassLoader |
getClassLoader()
Returns the classloader to be used by the underlying parser.
|
List<String> |
getContextPath()
Returns the list of paths to be searched for binding information.
|
ValidationEventHandler |
getHandler()
Gets XML-specific validation handler.
|
Map<String,Object> |
getProperties()
Returns the properties associated with the underlying parser.
|
ParserConfigurator |
setAdapter(XmlAdapter adapter)
Sets XML-specific adapter.
|
ParserConfigurator |
setClassLoader(ClassLoader loader)
Sets the classloader to be used by underlying implementations.
|
ParserConfigurator |
setContextPath(List<String> contextPath)
Sets the list of paths that implementations can search in order to find binding information.
|
ParserConfigurator |
setHandler(ValidationEventHandler handler)
Sets XML-specific validation handler.
|
ParserConfigurator setContextPath(List<String> contextPath)
contextPath
- a list of paths that implementations can search in order to find binding
informationList<String> getContextPath()
ParserConfigurator setClassLoader(ClassLoader loader)
loader
- the classloader for the parser to useClassLoader getClassLoader()
ParserConfigurator setHandler(ValidationEventHandler handler)
This is one of two XML-specific settings on the configurator. As XML is a ubiquitous externalizable format, these concessions have been made to provide first-class support to its parsers.
handler
- the validation handler to pass to the underlying parserValidationEventHandler getHandler()
ParserConfigurator setAdapter(XmlAdapter adapter)
This is one of two XML-specific settings on the configurator. As XML is a ubiquitous externalizable format, these concessions have been made to provide first-class support to its parsers.
adapter
- the adapter to pass to the underlying parserXmlAdapter getAdapter()
ParserConfigurator addProperty(String key, Object val)
key
- the unique key for the entryval
- the value of the propertyParserConfigurator addProperties(Map<String,Object> properties)
properties
- a collection of key-value objects to setThis work is licensed under a Creative Commons Attribution 4.0 International License.