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 Object
- implements XMLParserPool
This is the default implementation of XMLParserPool. Note: this
implementation is not thread safe.
Method Summary |
SAXParser |
get(Map features,
Map properties,
boolean useLexicalHandler)
Retrieves a parser from the pool given specified properties and features.
|
void |
release(SAXParser parser,
Map features,
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 SAXParser get(Map features,
Map properties,
boolean useLexicalHandler)
throws ParserConfigurationException,
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:
SAXException
ParserConfigurationException
- See Also:
XMLParserPool.get(Map, Map, boolean)
release
public void release(SAXParser parser,
Map features,
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)