org.exolab.castor.xml
public final class UnmarshalHandler extends MarshalFramework implements DocumentHandler, ErrorHandler
Version: $Revision: 1.8 $ $Date: 2003/05/28 08:10:07 $
Nested Class Summary | |
---|---|
class | UnmarshalHandler.Arguments
Internal class used for passing constructor argument
information |
static class | UnmarshalHandler.ArrayHandler
A class for handling Arrays during unmarshalling.
|
class | UnmarshalHandler.IDResolverImpl
Local IDResolver
|
class | UnmarshalHandler.ReferenceInfo
Internal class used to save state for reference resolving
|
Constructor Summary | |
---|---|
protected | UnmarshalHandler()
Creates a new UnmarshalHandler
The "root" class will be obtained by looking into the mapping
for a descriptor that matches the root element.
|
protected | UnmarshalHandler(Class _class)
Creates a new UnmarshalHandler |
Method Summary | |
---|---|
void | characters(char[] ch, int start, int length) |
void | endDocument() |
void | endElement(String name) |
void | error(SAXParseException exception) |
void | fatalError(SAXParseException exception) |
Object | getCurrentObject()
Returns the Object that the UnmarshalHandler is currently
handling (within the object model), or null if the current
element is a simpleType.
|
Locator | getDocumentLocator() |
Object | getObject()
Returns the "root" Object (ie. the entire object model)
being unmarshalled.
|
void | ignorableWhitespace(char[] ch, int start, int length) |
void | processingInstruction(String target, String data) |
void | setClassLoader(ClassLoader loader)
Sets the ClassLoader to use when loading classes
|
void | setClearCollections(boolean clear)
Sets whether or not to clear collections (including arrays)
upon first use to remove default values. |
protected void | setConfiguration(Configuration config)
Sets the current Castor configuration. |
void | setDebug(boolean debug)
Turns debuging on or off. |
void | setDocumentLocator(Locator locator) |
void | setIDResolver(IDResolver idResolver)
Sets the IDResolver to use when resolving IDREFs for
which no associated element may exist in XML document.
|
void | setIgnoreExtraAttributes(boolean ignoreExtraAtts)
Sets whether or not attributes that do not match
a specific field should simply be ignored or
reported as an error. |
void | setIgnoreExtraElements(boolean ignoreExtraElems)
Sets whether or not elements that do not match
a specific field should simply be ignored or
reported as an error. |
void | setLogWriter(PrintWriter printWriter)
Sets the PrintWriter used for printing log messages |
void | setResolver(ClassDescriptorResolver cdResolver)
Sets the ClassDescriptorResolver to use for loading and
resolving ClassDescriptors
|
void | setReuseObjects(boolean reuse)
Sets a boolean that when true indicates that objects
contained within the object model should be re-used
where appropriate. |
void | setRootObject(Object root)
Sets the root (top-level) object to use for unmarshalling into.
|
void | setUnmarshalListener(UnmarshalListener listener)
Sets an {@link UnmarshalListener}.
|
void | setValidation(boolean validate)
Sets the flag for validation |
void | startDocument() |
void | startElement(String name, AttributeList attList) |
static Object | toPrimitiveObject(Class type, String value)
Converts a String to the given primitive object type |
void | warning(SAXParseException exception) |
Parameters: _class the Class to create the UnmarshalHandler for
Returns: the Object currently being unmarshalled, or null if the current element is a simpleType.
Returns: the root Object being unmarshalled.
Parameters: loader the ClassLoader to use
Parameters: clear the boolean value that when true indicates collections should be cleared upon first use.
Parameters: debug the flag indicating whether to generate debug information. A value of true, will turn debuggin on.
See Also: UnmarshalHandler
Parameters: idResolver the IDResolver to use when resolving IDREFs for which no associated element may exist in the XML document.
Parameters: ignoreExtraAtts a boolean that when true will allow non-matched attributes to simply be ignored.
Parameters: ignoreExtraElems a boolean that when true will allow non-matched attributes to simply be ignored.
Parameters: printWriter the PrintWriter to use when printing log messages
Parameters: cdResolver the ClassDescriptorResolver to use
Parameters: reuse the boolean indicating whether or not to re-use existing objects in the object model.
Parameters: root the instance to unmarshal into.
Parameters: listener the UnmarshalListener to use with this instance of the UnmarshalHandler.
Parameters: validate, a boolean to indicate whether or not
validation should be done during umarshalling.
By default, validation will be performed.
Parameters: type the class type of the primitive in which to convert the String to value the String to convert to a primitive
Returns: the new primitive Object