@Test public void testDoneParsing() throws SAXException { handler.getHandlerForChild( URI, "formula-header", null ); handler.doneParsing(); MailHeader[] headers = handler.getHeaders(); assertThat( headers, is( notNullValue() ) ); assertThat( headers.length, is( equalTo( 1 ) ) ); assertThat( headers[0], is( instanceOf( FormulaHeader.class ) ) ); Object objResult = handler.getObject(); assertThat( objResult, is( notNullValue() ) ); assertThat( (MailHeader[]) objResult, is( equalTo( headers ) ) ); }
protected void doneParsing() throws SAXException { headers = new MailHeader[headerReadHandlers.size()]; for ( int i = 0; i < headerReadHandlers.size(); i++ ) { final XmlReadHandler handler = (XmlReadHandler) headerReadHandlers.get( i ); headers[i] = (MailHeader) handler.getObject(); } }
HeadersReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { headers = new MailHeader[headerReadHandlers.size()]; for ( int i = 0; i < headerReadHandlers.size(); i++ ) { final XmlReadHandler handler = (XmlReadHandler) headerReadHandlers.get( i ); headers[i] = (MailHeader) handler.getObject(); } } }
HeadersReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { headers = new MailHeader[headerReadHandlers.size()]; for ( int i = 0; i < headerReadHandlers.size(); i++ ) { final XmlReadHandler handler = (XmlReadHandler) headerReadHandlers.get( i ); headers[i] = (MailHeader) handler.getObject(); } } HeadersReadHandler(); }
HeadersReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { headers = new MailHeader[headerReadHandlers.size()]; for ( int i = 0; i < headerReadHandlers.size(); i++ ) { final XmlReadHandler handler = (XmlReadHandler) headerReadHandlers.get( i ); headers[i] = (MailHeader) handler.getObject(); } } HeadersReadHandler(); Object getObject(); MailHeader[] getHeaders(); }
HeadersReadHandler extends AbstractXmlReadHandler { protected void doneParsing() throws SAXException { headers = new MailHeader[headerReadHandlers.size()]; for ( int i = 0; i < headerReadHandlers.size(); i++ ) { final XmlReadHandler handler = (XmlReadHandler) headerReadHandlers.get( i ); headers[i] = (MailHeader) handler.getObject(); } } HeadersReadHandler(); Object getObject(); MailHeader[] getHeaders();  }