/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* The main class to parse JavaBeans XML archive.
*
* @since 1.7
*
* @author Sergey A. Malenkov
*
* @see ElementHandler
*/
/**
* Creates new instance of document handler.
*/
public DocumentHandler() {
// some handlers for new elements
}
/**
* Returns the class loader used to instantiate objects.
* If the class loader has not been explicitly set
* then {@code null} is returned.
*
* @return the class loader used to instantiate objects
*/
: null;
}
/**
* Sets the class loader used to instantiate objects.
* If the class loader is not set
* then default class loader will be used.
*
* @param loader a classloader to use
*/
}
/**
* Returns the exception listener for parsing.
* The exception listener is notified
* when handler catches recoverable exceptions.
* If the exception listener has not been explicitly set
* then default exception listener is returned.
*
* @return the exception listener for parsing
*/
return this.listener;
}
/**
* Sets the exception listener for parsing.
* The exception listener is notified
* when handler catches recoverable exceptions.
*
* @param listener the exception listener for parsing
*/
}
/**
* Returns the owner of this document handler.
*
* @return the owner of this document handler
*/
return this.owner;
}
/**
* Sets the owner of this document handler.
*
* @param owner the owner of this document handler
*/
}
/**
* Returns the handler for the element with specified name.
*
* @param name the name of the element
* @return the corresponding element handler
*/
}
return type;
}
/**
* Sets the handler for the element with specified name.
*
* @param name the name of the element
* @param handler the corresponding element handler
*/
}
/**
* Indicates whether the variable with specified identifier is defined.
*
* @param id the identifier
* @return @{code true} if the variable is defined;
* @{code false} otherwise
*/
}
/**
* Returns the value of the variable with specified identifier.
*
* @param id the identifier
* @return the value of the variable
*/
}
}
/**
* Sets new value of the variable with specified identifier.
*
* @param id the identifier
* @param value new value of the variable
*/
}
/**
* Returns the array of readed objects.
*
* @return the array of readed objects
*/
}
/**
* Adds the object to the list of readed objects.
*
* @param object the object that is readed from XML document
*/
}
/**
* Prepares this handler to read objects from XML document.
*/
public void startDocument() {
}
/**
* Parses opening tag of XML element
* using corresponding element handler.
*
* @param uri the namespace URI, or the empty string
* if the element has no namespace URI or
* if namespace processing is not being performed
* @param localName the local name (without prefix), or the empty string
* if namespace processing is not being performed
* @param qName the qualified name (with prefix), or the empty string
* if qualified names are not available
* @param attributes the attributes attached to the element
*/
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
try {
}
throw new SAXException(exception);
}
try {
}
catch (RuntimeException exception) {
}
this.handler.startElement();
}
/**
* Parses closing tag of XML element
* using corresponding element handler.
*
* @param uri the namespace URI, or the empty string
* if the element has no namespace URI or
* if namespace processing is not being performed
* @param localName the local name (without prefix), or the empty string
* if namespace processing is not being performed
* @param qName the qualified name (with prefix), or the empty string
* if qualified names are not available
*/
try {
this.handler.endElement();
}
catch (RuntimeException exception) {
}
finally {
}
}
/**
* Parses character data inside XML element.
*
* @param chars the array of characters
* @param start the start position in the character array
* @param length the number of characters to use
*/
try {
while (0 < length--) {
}
}
catch (RuntimeException exception) {
}
}
}
/**
* Handles an exception using current exception listener.
*
* @param exception an exception to handle
* @see #setExceptionListener
*/
throw new IllegalStateException(exception);
}
}
/**
* Starts parsing of the specified input source.
*
* @param input the input source to parse
*/
throw new SecurityException("AccessControlContext is not set");
}
try {
}
catch (ParserConfigurationException exception) {
}
catch (SAXException wrapper) {
}
}
catch (IOException exception) {
}
return null;
}
}
/**
* Resolves class by name using current class loader.
* This method handles exception using current exception listener.
*
* @param name the name of the class
* @return the object that represents the class
*/
try {
}
catch (ClassNotFoundException exception) {
return null;
}
}
}