Package org.jfree.xml.parser.coretypes
Class ListReadHandler
java.lang.Object
org.jfree.xml.parser.AbstractXmlReadHandler
org.jfree.xml.parser.coretypes.ListReadHandler
- All Implemented Interfaces:
XmlReadHandler
A SAX handler for reading a list from an XML element.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ListcreateList(int initialSize) Creates a list.protected voidParsing is finished.protected XmlReadHandlergetHandlerForChild(String tagName, Attributes atts) Gets a handler for a child.Returns the object under construction.protected voidstartParsing(Attributes attrs) Start parsing.Methods inherited from class org.jfree.xml.parser.AbstractXmlReadHandler
characters, endElement, getRootHandler, getTagName, init, startElement
-
Field Details
-
retval
The list under construction. -
handlers
The handlers. -
listType
The type of list ('array-list', 'linked-list', 'stack', 'vector').
-
-
Constructor Details
-
ListReadHandler
public ListReadHandler()Default constructor.
-
-
Method Details
-
startParsing
Start parsing.- Overrides:
startParsingin classAbstractXmlReadHandler- Parameters:
attrs- the attributes.- Throws:
SAXException- if there is a parsing error.
-
getHandlerForChild
protected XmlReadHandler getHandlerForChild(String tagName, Attributes atts) throws XmlReaderException, SAXException Gets a handler for a child.- Overrides:
getHandlerForChildin classAbstractXmlReadHandler- Parameters:
tagName- the tag name.atts- the attributes.- Returns:
- A handler.
- Throws:
XmlReaderException- if there is a problem with the reader.SAXException- if there is a parsing error.
-
doneParsing
Parsing is finished.- Overrides:
doneParsingin classAbstractXmlReadHandler- Throws:
SAXException- if there is a parsing error.XmlReaderException- if there is a problem with the reader.
-
createList
Creates a list.- Parameters:
initialSize- the initial size.- Returns:
- A new list.
-
getObject
Returns the object under construction.- Returns:
- The list.
-