From: Peter Bernard West Date: Wed, 9 Oct 2002 04:52:21 +0000 (+0000) Subject: Removed stackedBy references. Modified toString(). X-Git-Tag: Alt-Design_pre_Properties_split~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=47478a5060aff1ddb483a01173da0d32cfb330b6;p=xmlgraphics-fop.git Removed stackedBy references. Modified toString(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195305 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/datatypes/PropertyValueList.java b/src/org/apache/fop/datatypes/PropertyValueList.java index 2d18ecccc..e5037916e 100644 --- a/src/org/apache/fop/datatypes/PropertyValueList.java +++ b/src/org/apache/fop/datatypes/PropertyValueList.java @@ -1,5 +1,7 @@ package org.apache.fop.datatypes; +import java.lang.reflect.InvocationTargetException; + import java.util.LinkedList; import java.util.Collection; import java.util.Iterator; @@ -38,11 +40,6 @@ public class PropertyValueList extends LinkedList implements PropertyValue { */ public final int type; - /** - * The FONode that stacked this value. - */ - private FONode stackedBy = null; - /** * @param property int index of the property. */ @@ -183,21 +180,6 @@ public class PropertyValueList extends LinkedList implements PropertyValue { return type; } - /** - * Set the node that stacked this value. - * @param node - the FONode that stacked this value. - */ - public void setStackedBy(FONode node) { - stackedBy = node; - } - - /** - * Get the node that stacked this value. - */ - public FONode getStackedBy() { - return stackedBy; - } - /** * In some circumstances, the property against which a type is to be * validated may not be the same as the property against which this @@ -248,9 +230,20 @@ public class PropertyValueList extends LinkedList implements PropertyValue { Iterator contents = iterator(); while (contents.hasNext()) { int i = 0, j = 0; - cstr = contents.next().toString(); + Object obj = contents.next(); + try { + cstr = (String)(obj.getClass() + .getMethod("toString", null) + .invoke(obj, null)); + } catch (IllegalAccessException e) { + throw new PropertyException (e); + } catch (NoSuchMethodException e) { + throw new PropertyException (e); + } catch (InvocationTargetException e) { + throw new PropertyException (e); + } while (i < cstr.length() && j >= 0) { - j = cstr.indexOf('\n'); + j = cstr.indexOf('\n', j); if (j >= 0) { str = str + ">" + cstr.substring(i, ++j); i = j;