JHotDraw 7.4.1

net.n3.nanoxml
Class XMLParserFactory

java.lang.Object
  extended by net.n3.nanoxml.XMLParserFactory

public class XMLParserFactory
extends java.lang.Object

Creates an XML parser.

Version:
$Name: RELEASE_2_2_1 $, $Revision: 1.3 $
Author:
Marc De Scheemaecker

Field Summary
static java.lang.String CLASS_KEY
          The Java properties key of the XML parser class name.
static java.lang.String DEFAULT_CLASS
          The class name of the default XML parser.
 
Constructor Summary
XMLParserFactory()
           
 
Method Summary
static IXMLParser createDefaultXMLParser()
          Creates a default parser.
static IXMLParser createDefaultXMLParser(IXMLBuilder builder)
          Creates a default parser.
static IXMLParser createXMLParser(java.lang.String className, IXMLBuilder builder)
          Creates a parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CLASS

public static final java.lang.String DEFAULT_CLASS
The class name of the default XML parser.

See Also:
Constant Field Values

CLASS_KEY

public static final java.lang.String CLASS_KEY
The Java properties key of the XML parser class name.

See Also:
Constant Field Values
Constructor Detail

XMLParserFactory

public XMLParserFactory()
Method Detail

createDefaultXMLParser

public static IXMLParser createDefaultXMLParser()
                                         throws java.lang.ClassNotFoundException,
                                                java.lang.InstantiationException,
                                                java.lang.IllegalAccessException
Creates a default parser.

Returns:
the non-null parser.
Throws:
java.lang.ClassNotFoundException - if the class of the parser or validator could not be found.
java.lang.InstantiationException - if the parser could not be created
java.lang.IllegalAccessException - if the parser could not be created
See Also:
DEFAULT_CLASS, CLASS_KEY

createDefaultXMLParser

public static IXMLParser createDefaultXMLParser(IXMLBuilder builder)
                                         throws java.lang.ClassNotFoundException,
                                                java.lang.InstantiationException,
                                                java.lang.IllegalAccessException
Creates a default parser.

Parameters:
builder - the XML builder.
Returns:
the non-null parser.
Throws:
java.lang.ClassNotFoundException - if the class of the parser could not be found.
java.lang.InstantiationException - if the parser could not be created
java.lang.IllegalAccessException - if the parser could not be created
See Also:
DEFAULT_CLASS, CLASS_KEY

createXMLParser

public static IXMLParser createXMLParser(java.lang.String className,
                                         IXMLBuilder builder)
                                  throws java.lang.ClassNotFoundException,
                                         java.lang.InstantiationException,
                                         java.lang.IllegalAccessException
Creates a parser.

Parameters:
className - the name of the class of the XML parser
builder - the XML builder.
Returns:
the non-null parser.
Throws:
java.lang.ClassNotFoundException - if the class of the parser could not be found.
java.lang.InstantiationException - if the parser could not be created
java.lang.IllegalAccessException - if the parser could not be created

Copyright 1996-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.