]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Removed stackedBy references. Modified toString().
authorPeter Bernard West <pbwest@apache.org>
Wed, 9 Oct 2002 04:52:21 +0000 (04:52 +0000)
committerPeter Bernard West <pbwest@apache.org>
Wed, 9 Oct 2002 04:52:21 +0000 (04:52 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195305 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/datatypes/PropertyValueList.java

index 2d18eccccb06c16a54096a87ba92ec22e7151359..e5037916e7d3585f7b6cc2b865809410199eff33 100644 (file)
@@ -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 <tt>FONode</tt> that stacked this value.
-     */
-    private FONode stackedBy = null;
-
     /**
      * @param property <tt>int</tt> 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 <tt>FONode</tt> 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;