org.eclipse.emf.ecore.xmi.impl
Class XMLParserPoolImpl
java.lang.Object
org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl
- All Implemented Interfaces:
- XMLParserPool
- public class XMLParserPoolImpl
- extends java.lang.Object
- implements XMLParserPool
This is the default implementation of XMLParserPool. Note: this
implementation is not thread safe.
Method Summary |
javax.xml.parsers.SAXParser |
get(java.util.Map features,
java.util.Map properties,
boolean useLexicalHandler)
Retrieves a parser from the pool given specified properties and features.
|
void |
release(javax.xml.parsers.SAXParser parser,
java.util.Map features,
java.util.Map properties,
boolean useLexicalHandler)
Returns the parser to the pool. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XMLParserPoolImpl
public XMLParserPoolImpl()
get
public javax.xml.parsers.SAXParser get(java.util.Map features,
java.util.Map properties,
boolean useLexicalHandler)
throws javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException
- Description copied from interface:
XMLParserPool
- Retrieves a parser from the pool given specified properties and features.
If parser can't be created using specified properties or features,
an exception can be thrown.
- Specified by:
get
in interface XMLParserPool
- Parameters:
features
- a map of the parser features and their values.properties
- a map of a parser properties and their values.useLexicalHandler
- whether a lexical handler was set during loading.
- Returns:
- A parser instance with given features and properties.
- Throws:
org.xml.sax.SAXException
javax.xml.parsers.ParserConfigurationException
- See Also:
XMLParserPool.get(Map, Map, boolean)
release
public void release(javax.xml.parsers.SAXParser parser,
java.util.Map features,
java.util.Map properties,
boolean useLexicalHandler)
- Description copied from interface:
XMLParserPool
- Returns the parser to the pool.
- Specified by:
release
in interface XMLParserPool
- Parameters:
parser
- the parser to return to the pool.features
- a map of the parser features and their values.properties
- a map of a parser properties and their values.useLexicalHandler
- whether a lexical handler was set during loading.- See Also:
XMLParserPool.release(SAXParser, Map, Map, boolean)