|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.arch4j.xml.XMLProvider
This class is the main provider for xml services.
The services are accessed via the static getProvider()
method.
As an example of access to the services:
String fileName = "file.xml"; FileReader reader = new FileReader(fileName); XMLStream stream = XMLProvider.getProvider().getXMLStream(reader, this);
Field Summary | |
protected String |
DEFAULT_XML_STREAM_CLASS
The fallback XML stream implementation. |
protected String |
XML_DOMAIN
The XML domain property file name. |
protected String |
XML_STREAM_CLASS_PROPERTY
The XML stream implementation class property name. |
Constructor Summary | |
protected |
XMLProvider()
This is made protected so the only way to access this class is
through the getProvider method. |
Method Summary | |
protected Object |
createInstance(Class aClass)
Create an instance from the Class . |
static XMLProvider |
getProvider()
Returns the singleton instance of this class. |
XMLStream |
getXMLStream(Reader characterStream,
XMLHandler callbackHandler)
Returns a reference to a new XMLStream implementation. |
protected Class |
getXMLStreamClass()
Get the XML stream implementation class to use from the property setting. |
static void |
resetProvider()
Remove the single instance of the XMLProvider . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final String XML_DOMAIN
protected final String XML_STREAM_CLASS_PROPERTY
protected final String DEFAULT_XML_STREAM_CLASS
Constructor Detail |
protected XMLProvider()
protected
so the only way to access this class is
through the getProvider
method.
Method Detail |
public static XMLProvider getProvider()
public static void resetProvider()
XMLProvider
.
public XMLStream getXMLStream(Reader characterStream, XMLHandler callbackHandler)
XMLStream
implementation.
characterStream
- The source data.callbackHandler
- The class that handles events found while parsing.
XMLStream
implementation.protected Class getXMLStreamClass()
Class
.
EnvironmentalException
- if unable to retrieve the classname property or associate a
Class
object with the classname.protected Object createInstance(Class aClass)
Class
.
EnvironmentalException
- if fails to create a new instance of the Class
.
|
Arch4J 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |