From 2d2c65788c0ab2749558472daebcd6c244649d83 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Wed, 14 Jan 2004 16:27:19 +0000 Subject: [PATCH] Constructors require sequence and uriIndex git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197181 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/xml/FoXMLEvent.java | 28 ++++++++++++--------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/java/org/apache/fop/xml/FoXMLEvent.java b/src/java/org/apache/fop/xml/FoXMLEvent.java index dca3169f8..ff582a3e9 100644 --- a/src/java/org/apache/fop/xml/FoXMLEvent.java +++ b/src/java/org/apache/fop/xml/FoXMLEvent.java @@ -57,6 +57,7 @@ import org.xml.sax.helpers.AttributesImpl; import org.apache.fop.apps.FOPException; import org.apache.fop.fo.FObjectNames; +import org.apache.fop.pool.Poolable; /** * This is a data class to encapsulate the data of an individual XML @@ -71,15 +72,16 @@ public class FoXMLEvent extends XMLEvent { private static final String revision = "$Revision$"; /** The FO type, as defined in FObjectNames, of fo: XML events. */ - protected int foType = FObjectNames.NO_FO; + private int foType = FObjectNames.NO_FO; /** - * The one-argument constructor uses the default initialization values: - * NOEVENT for the event type, and null references for all others - * except namespaces. + * @param namespaces the XMLNamespaces object + * @param sequence the sequence number of the event within its + * namespace + * @param uriIndex the namesopace index */ - public FoXMLEvent (XMLNamespaces namespaces, int sequence) { - super(namespaces, sequence); + public FoXMLEvent (XMLNamespaces namespaces, int sequence, int uriIndex) { + super(namespaces, sequence, uriIndex); } /** @@ -100,20 +102,22 @@ public class FoXMLEvent extends XMLEvent { /** * The cloning constructor takes a reference to an existing * FoXMLEvent object. + * @param ev the event to clone + * @param sequence number of the clone */ - public FoXMLEvent(FoXMLEvent ev) throws FOPException { - super(ev); + public FoXMLEvent(FoXMLEvent ev, int sequence) { + super(ev, sequence); foType = ev.foType; } public FoXMLEvent(XMLNamespaces namespaces, int sequence, - int type, String chars) { - super(namespaces, sequence, type, chars); + int uriIndex, int type, String chars) { + super(namespaces, sequence, uriIndex, type, chars); } public FoXMLEvent(XMLNamespaces namespaces, int sequence, int type, int uriIndex, AttributesImpl attributes, int foType) { - super(namespaces, sequence); + super(namespaces, sequence, uriIndex); this.type = type; this.uriIndex = uriIndex; this.attributes = attributes; @@ -125,7 +129,7 @@ public class FoXMLEvent extends XMLEvent { * Neither the namespaces nor the id field is cleared. * @return the cleared XMLEvent event. */ - public XMLEvent clear() { + public Poolable clear() { foType = FObjectNames.NO_FO; return super.clear(); } -- 2.39.5