diff options
Diffstat (limited to 'libjava/classpath/gnu/java/beans/encoder')
29 files changed, 233 insertions, 233 deletions
diff --git a/libjava/classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java b/libjava/classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java index 12d757e2dde..52fc457966c 100644 --- a/libjava/classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java +++ b/libjava/classpath/gnu/java/beans/encoder/ArrayPersistenceDelegate.java @@ -7,7 +7,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -92,12 +92,12 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate // Compares the array value against a prototypical // null value of the array's component type in order to skip // writing the default values of an array. - + // Note: I have no idea why the persistence delegate for arrays writes // an Expression that reads the value and then writes a Statement that sets // the value. However it turned out that object arrays work better with the // get-Expression and primitive array work fine with the set-Statement. - + type = type.getComponentType(); if (type.isPrimitive()) { @@ -113,7 +113,7 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate new Object[] { oldInstance, Integer.valueOf(i), })); - + out.writeStatement(new Statement(Array.class, "set", new Object[] { oldInstance, @@ -122,7 +122,7 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate })); } } - + } else { @@ -130,14 +130,14 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate for (int i = 0; i < length; i++) { Object oldValue = Array.get(oldInstance, i); - + if (oldValue != null) { out.writeExpression(new Expression(Array.class, "get", new Object[] { oldInstance, Integer.valueOf(i), })); - + out.writeStatement(new Statement(Array.class, "set", new Object[] { oldInstance, @@ -147,7 +147,7 @@ public class ArrayPersistenceDelegate extends PersistenceDelegate } } } - + } } diff --git a/libjava/classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java b/libjava/classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java index 7b0656a5d35..1430a6dbeff 100644 --- a/libjava/classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java +++ b/libjava/classpath/gnu/java/beans/encoder/ClassPersistenceDelegate.java @@ -7,7 +7,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -43,7 +43,7 @@ import java.beans.PersistenceDelegate; /** <p>The <code>ClassPersistenceDelegate</code> creates * <code>Expression</code> instances which denote class resolutions.</p> - * + * * <p>The class resolution is always the last step when serializing a tree * of objects. Due to the recursive nature of the algorithm we need a way * to end the recursion. This is achieved by the implementation of this @@ -52,8 +52,8 @@ import java.beans.PersistenceDelegate; * we call <code>getClass()</code> on a <code>String.class</code> instance. * This in turn lead to the resolution of the String class which is always * encoded as <code>"".getClass()</code>. Finally the <code>Encoder</code> - * treats strings in a special way so that the recursion ends here. - * + * treats strings in a special way so that the recursion ends here. + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class ClassPersistenceDelegate extends PersistenceDelegate @@ -62,7 +62,7 @@ public class ClassPersistenceDelegate extends PersistenceDelegate protected Expression instantiate(Object oldInstance, Encoder out) { Class oldClass = (Class) oldInstance; - + // Due to the special handling of String instances in the Encoder // this Expression does not lead to further class resolutions. if (oldClass == String.class) @@ -72,7 +72,7 @@ public class ClassPersistenceDelegate extends PersistenceDelegate if (oldClass == Class.class) return new Expression(oldClass, String.class, "getClass", null); - // This Expression will lead to the class resolution of Class.class. + // This Expression will lead to the class resolution of Class.class. return new Expression(oldClass, Class.class, "forName", new Object[] { oldClass.getName() }); } diff --git a/libjava/classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java b/libjava/classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java index f1375d2ec18..bdf6fda6233 100644 --- a/libjava/classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java +++ b/libjava/classpath/gnu/java/beans/encoder/CollectionPersistenceDelegate.java @@ -7,7 +7,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -49,10 +49,10 @@ import java.util.Iterator; /** <p>A <code>PersistenceDelegate</code> implementation that calls * the no-argument constructor to create the Collection instance and * uses an iterator to add all the objects it reaches through it.</p> - * + * * <p>It is used for <code>Set</code> and <code>List</code> * implementations.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class CollectionPersistenceDelegate extends PersistenceDelegate diff --git a/libjava/classpath/gnu/java/beans/encoder/Context.java b/libjava/classpath/gnu/java/beans/encoder/Context.java index 9126d496fc5..8acc4907b38 100644 --- a/libjava/classpath/gnu/java/beans/encoder/Context.java +++ b/libjava/classpath/gnu/java/beans/encoder/Context.java @@ -41,20 +41,20 @@ package gnu.java.beans.encoder; /** A <code>Contect</code> object describes the current state * and the call number while processing the original object * tree in the {@link ScanEngine}. - * + * * <p>The class allows to distinguish the different calling states * and is neccessary for the child element skipping feature of - * the {@link GenericScannerState}.</p> - * + * the {@link GenericScannerState}.</p> + * * @author Robert Schuster (robertschuster@fsfe.org) * */ public class Context { private String state; - + private int call; - + Context(String newState, int newCall) { state = newState; @@ -66,21 +66,21 @@ public class Context int hc = 7; hc = 31 * hc + state.hashCode(); hc = 31 * hc + call; - + return hc; } - + public boolean equals(Object o) { if (!(o instanceof Context)) return false; - + Context that = (Context) o; - + return state.equals(that.state) && call == that.call; } - + public String toString() { return "Context [state=" + state + ", call=" + call + "]"; diff --git a/libjava/classpath/gnu/java/beans/encoder/GenericScannerState.java b/libjava/classpath/gnu/java/beans/encoder/GenericScannerState.java index 3c3f8a3d2e7..b07771dbe41 100644 --- a/libjava/classpath/gnu/java/beans/encoder/GenericScannerState.java +++ b/libjava/classpath/gnu/java/beans/encoder/GenericScannerState.java @@ -60,12 +60,12 @@ import gnu.java.beans.encoder.elements.StringReference; * This class is a {@link ScannerState} implementation that creates * suitable {@link gnu.java.beans.encoder.elements.Element} instances * for each transition variant. - * + * * <p>Furthermore it can optionally skip a certain number of child - * elements. The algorithm can cope with the fact that one + * elements. The algorithm can cope with the fact that one * <code>GenericScannerState</code> instance may be called at * different levels of recursions.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ class GenericScannerState extends ScannerState @@ -89,19 +89,19 @@ class GenericScannerState extends ScannerState if (skipElements > 0) skipValues = new HashMap(); } - + protected void enterImpl(Context ctx) { if (skipValues != null) { Integer skip = (Integer) skipValues.get(ctx); - + if (skip == null) { skip = Integer.valueOf(initialSkipElements); skipValues.put(ctx, skip); } - + skipElements = skip.intValue(); } } diff --git a/libjava/classpath/gnu/java/beans/encoder/IgnoringScannerState.java b/libjava/classpath/gnu/java/beans/encoder/IgnoringScannerState.java index 054f1f0051c..3ec78cdf9ff 100644 --- a/libjava/classpath/gnu/java/beans/encoder/IgnoringScannerState.java +++ b/libjava/classpath/gnu/java/beans/encoder/IgnoringScannerState.java @@ -40,7 +40,7 @@ package gnu.java.beans.encoder; /** A special {@link ScannerState} implementation that ignores all child * elements. - * + * * <p>Consider the call hierarchy: * <code> * methodInvocation @@ -50,16 +50,16 @@ package gnu.java.beans.encoder; * classResolution * </code> * </p> - * + * * <p>When the ignoring state is active one can filter the elements of * one level. One has to set up the state machine that a transition * via "class resolution" from a state that was reached via "object * instantation" reaches an <code>IgnoringScannerState</code>.</p> - * + * * <p>Setting the default successor of a <code>IgnoringScannerState</code> * to itself causes all elements of the call hierarchy to be skipped - * until another state is reached by going back.</p> - * + * until another state is reached by going back.</p> + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -125,9 +125,9 @@ class IgnoringScannerState extends ScannerState void objectReference(ObjectId id) { } - + void end() { } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java b/libjava/classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java index 84cdce94dbe..9ffdb5686ce 100644 --- a/libjava/classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java +++ b/libjava/classpath/gnu/java/beans/encoder/MapPersistenceDelegate.java @@ -8,7 +8,7 @@ it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU diff --git a/libjava/classpath/gnu/java/beans/encoder/ObjectId.java b/libjava/classpath/gnu/java/beans/encoder/ObjectId.java index eca5c3da477..13d75d6bba4 100644 --- a/libjava/classpath/gnu/java/beans/encoder/ObjectId.java +++ b/libjava/classpath/gnu/java/beans/encoder/ObjectId.java @@ -45,7 +45,7 @@ import java.util.HashMap; * ObjectId provides an object identification mechanism which gives each object * a name in the form <code><class><Nameindex></code>. * </p> - * + * * <p> * Each id can be in an unused state which means that only one instance of the * object is in use and a special id is not needed. Certain {@link @@ -57,7 +57,7 @@ import java.util.HashMap; * The second user should then invoke the {@link #init} method to generate the * identification string and bring the id in the 'used' state. * </p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class ObjectId diff --git a/libjava/classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java b/libjava/classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java index 8cb3705b4d8..55626b512c2 100644 --- a/libjava/classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java +++ b/libjava/classpath/gnu/java/beans/encoder/PrimitivePersistenceDelegate.java @@ -8,7 +8,7 @@ GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. - + GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -44,7 +44,7 @@ import java.beans.PersistenceDelegate; /** * A shared PersistenceDelegate implementation for all primitive types. - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class PrimitivePersistenceDelegate extends PersistenceDelegate @@ -70,5 +70,5 @@ public class PrimitivePersistenceDelegate extends PersistenceDelegate out.writeExpression(new Expression(oldInstance, oldInstance.getClass(), "new", new Object[] { oldInstance.toString() })); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/ReportingScannerState.java b/libjava/classpath/gnu/java/beans/encoder/ReportingScannerState.java index fb6e061ae4d..c91bb1567d0 100644 --- a/libjava/classpath/gnu/java/beans/encoder/ReportingScannerState.java +++ b/libjava/classpath/gnu/java/beans/encoder/ReportingScannerState.java @@ -42,7 +42,7 @@ package gnu.java.beans.encoder; * A <code>ScannerState</code> implementation that prints useful details * about its arguments. Use it when the XML encoding does not work correctly * and you want to find out how things relate to each other. - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ class ReportingScannerState extends ScannerState @@ -50,12 +50,12 @@ class ReportingScannerState extends ScannerState void methodInvocation(String methodName) { - System.out.println("methodInvocation: " + methodName + "()"); + System.out.println("methodInvocation: " + methodName + "()"); } void staticMethodInvocation(String className, String methodName) { - System.out.println("staticMethodInvocation: " + className + "." + methodName + "()"); + System.out.println("staticMethodInvocation: " + className + "." + methodName + "()"); } void staticFieldAccess(String className, String fieldName) @@ -65,17 +65,17 @@ class ReportingScannerState extends ScannerState void classResolution(String className) { - System.out.println("classResolution: " + className); + System.out.println("classResolution: " + className); } void objectInstantiation(String className, ObjectId objectId) { - System.out.println("objectInstantiation: " + className); + System.out.println("objectInstantiation: " + className); } void primitiveInstantiation(String primitiveName, String valueAsString) { - System.out.println("primitiveInstantiation: (" + primitiveName + ") " + valueAsString); + System.out.println("primitiveInstantiation: (" + primitiveName + ") " + valueAsString); } void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId) @@ -90,27 +90,27 @@ class ReportingScannerState extends ScannerState void arraySet(String indexAsString) { - System.out.println("arraySet: " + indexAsString); + System.out.println("arraySet: " + indexAsString); } void arrayGet(String indexAsString) { - System.out.println("arrayGet: " + indexAsString); + System.out.println("arrayGet: " + indexAsString); } void listGet() { - System.out.println("listGet"); + System.out.println("listGet"); } void listSet() { - System.out.println("listSet"); + System.out.println("listSet"); } void nullObject() { - System.out.println("nullObject"); + System.out.println("nullObject"); } void stringReference(String string) @@ -125,7 +125,7 @@ class ReportingScannerState extends ScannerState void end() { - System.out.println("-close"); + System.out.println("-close"); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/Root.java b/libjava/classpath/gnu/java/beans/encoder/Root.java index f4eade1939d..a6410d716cc 100644 --- a/libjava/classpath/gnu/java/beans/encoder/Root.java +++ b/libjava/classpath/gnu/java/beans/encoder/Root.java @@ -46,14 +46,14 @@ import gnu.java.beans.encoder.elements.Element; /** <p><code>Root</code> provides a simple interface to a tree of * objects.</p> - * + * * <p>Using an instance of this class a logical representation of * the real object tree that is serialized can be built. When the * actual data should be written as XML <code>Root</code> and * {@link gnu.java.beans.encoder.elements.Element} class can provide * context information which is used to write the best fitting * XML representation.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class Root @@ -61,7 +61,7 @@ public class Root private Stack parents = new Stack(); private Element rootElement, current; - + private boolean started; public Root() @@ -70,10 +70,10 @@ public class Root } /** <p>Adds another child element to the tree.</p> - * + * * <p>The new element automatically becomes the current * element.</p> - * + * * @param elem The new child element. */ public void addChild(Element elem) @@ -88,7 +88,7 @@ public class Root * <p>Marks that the end of the current element * is reached and that no more childs are added to * it.</p> - * + * * <p>The behavior is to return to the nearest parent * element.</p> */ @@ -100,7 +100,7 @@ public class Root /** * <p>Goes back to the nearest parent element but * deletes the just created child.</p> - * + * * <p>This is used if something went wrong while * processing the child element's {@link java.beans.Expression} * or {@link java.beans.Statement}.</p> @@ -117,9 +117,9 @@ public class Root * <p>Traverses the elements in the object tree * and creates their XML representation in the output * stream of the given {@link Writer}.</p> - * + * * <p>Finally the <code>Writer</code> is flushed.</p> - * + * * @param writer The Writer instance that generates the XML representation. */ public void traverse(Writer writer) @@ -130,16 +130,16 @@ public class Root rootElement.writeStart(writer); } started = true; - + traverse(writer, rootElement.iterator()); - + rootElement.clear(); - + writer.flush(); } /** Writes the closing element and closes the {@link Writer} - * + * * @param writer The Writer instance that generates the XML representation. */ public void close(Writer writer) @@ -149,7 +149,7 @@ public class Root } /** Recursively traverses the object tree. - * + * * @param writer The Writer instance that generates the XML representation. * @param ite An Iterator returning Element instances. */ @@ -163,19 +163,19 @@ public class Root traverse(writer, e.iterator()); e.writeEnd(writer); - + e.clear(); } } /** <p>A special Element implementation that represents the * encoder's context.</p> - * + * * <p>This element is written only once per Writer.</p> - * + * * <p>It is assumed that this element is never empty to simplify * the implementation.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org); * */ @@ -187,7 +187,7 @@ public class Root new String[] { System.getProperty("java.version"), XMLEncoder.class.getName() }, false); } - + public void writeEnd(Writer writer) { writer.writeEnd(false); diff --git a/libjava/classpath/gnu/java/beans/encoder/ScanEngine.java b/libjava/classpath/gnu/java/beans/encoder/ScanEngine.java index b78a8141384..9ced143f0dc 100644 --- a/libjava/classpath/gnu/java/beans/encoder/ScanEngine.java +++ b/libjava/classpath/gnu/java/beans/encoder/ScanEngine.java @@ -1,4 +1,4 @@ -/* ScanEngine.java +/* ScanEngine.java -- Scans the input and generates an object tree that can be written as XML. Copyright (C) 2005 Free Software Foundation, Inc. @@ -54,7 +54,7 @@ import java.util.Stack; * {@link #writeObject} method and feeds it to a state machine. The * state machine then constructs and object tree which is finally * written as XML by a {@link Writer} implementation.</p> - * + * * <p>How does it work?</p> * <p>The <code>ScanEngine</code> sits below the {@link java.beans.XMLEncoder} * class and is called by it exclusively. The <code>XMLEncoder</code> sends @@ -65,7 +65,7 @@ import java.util.Stack; * Furthermore the meaning of certain <code>Expressions</code> differs * depending on the enclosing elements or the inner elements have to be * simply discarded.</p> - * + * * <p>To cope with this state dependant nature the <code>ScanEngine</code> * contains a state machine which is programmed statically (no adjustments are * needed, all <code>ScanEngine</code> engines use the same setup). The @@ -83,7 +83,7 @@ import java.util.Stack; * the current state and then the event method is called in the new current * state. The last step allows the state instance to do something meaningful * to the object tree.</p> - * + * * <p>The state machine knows the concept of returning to the previous * state. This is done using a stack of states which is popped every * time a call to <code>writeStatement</code>, <code>writeExpression</code> @@ -93,7 +93,7 @@ import java.util.Stack; * <code>ScanEngine</code> itself to decide when an expression or statement * ended. This can only be done in case of {@link #writeObject} calls because * they are not nested.</p> - * + * * <p>When the XML persistence mechanism reaches an object twice (and more) * it should generate an XML element using the "idref" attribute and add * an "id" attribute to its first instantiation. This complicates things a bit @@ -106,12 +106,12 @@ import java.util.Stack; * instance is stored in the <code>ScanEngine</code> and gets cleared whenever * the {@link #flush} method is called. This method also writes the currently * built object tree and generates the XML representation.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class ScanEngine { - + /** Change this to true to let the ScanEngine print state transition * information. */ @@ -145,7 +145,7 @@ public class ScanEngine /** Stores the relationship between objects and their {@link ObjectId} instance. */ IdentityHashMap objects = new IdentityHashMap(); - + public ScanEngine(OutputStream os) { // TODO: Provide another Writer implementation (e.g. one that does not use @@ -182,7 +182,7 @@ public class ScanEngine "newObj0"); conf = register("newObj0", new GenericScannerState(root)); conf.setDefaultSuccessor("ignoreAll"); - + // Simply use the start state to encode method invocations inside of // objects. conf.putSuccessor(ScannerState.TRANSITION_METHOD_INVOCATION, "start"); @@ -203,14 +203,14 @@ public class ScanEngine conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, "ignoreAll"); - + // Get here when a value is set in the array. register("newOArrayGet", conf = new GenericScannerState(root)); - + conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, "newOArrayGet_ignoreFirstInteger"); - + // "newArrayGet_ignoreFirstInteger" is set up mostly identical like the "start" // state. Otherwise things would not behave the same when done inside // arrays. @@ -223,21 +223,21 @@ public class ScanEngine "newPrimitiveArray"); conf.putSuccessor(ScannerState.TRANSITION_OBJECT_ARRAY_INSTANTIATION, "newObjectArray"); - + conf = register("newOArrayGet_ignoreFirstInteger", new GenericScannerState(root, 1)); - + // In non-int primitive arrays class resolutions can happen // but they should be ignored. conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); - + // Spurious object and string references occur when setting array // elements. This suppresses them. conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, "ignoreAll"); conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "ignoreAll"); conf.putSuccessor(ScannerState.TRANSITION_STRING_REFERENCE, "ignoreAll"); - + conf.setDefaultSuccessor("start"); // Primitive arrays use the ARRAY_SET transition to create setting the @@ -252,11 +252,11 @@ public class ScanEngine conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, "ignoreAll"); - + conf = register("newPArraySet", new GenericScannerState(root)); conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, "newPArraySet_ignoreFirstInteger"); - + // Primitive arrays ignore all kinds of non-primitive object information. conf.putSuccessor(ScannerState.TRANSITION_OBJECT_REFERENCE, "ignoreAll"); @@ -271,11 +271,11 @@ public class ScanEngine conf = register("newPArraySet_ignoreFirstInteger", new GenericScannerState(root, 1)); - + // In non-int primitive arrays class resolutions can happen // but they should be ignored. conf.putSuccessor(ScannerState.TRANSITION_CLASS_RESOLUTION, "ignoreAll"); - + // Spurious object and string references occur when setting array // elements. This suppresses them. conf.putSuccessor(ScannerState.TRANSITION_PRIMITIVE_INSTANTIATION, @@ -287,7 +287,7 @@ public class ScanEngine } /** Registers a <code>ScannerState</code> under a certain name. - * + * * @param name Name of the state * @param state The <code>ScannerState</code> instance. * @return The second argument. @@ -295,26 +295,26 @@ public class ScanEngine private ScannerState register(String name, ScannerState state) { state.init(name); - + states.put(name, state); return state; } - + /** Generates or returns an id for the given object which can be activated * later if the object is suitable. - * + * * <p>Objects are unsuitable if they are an instance of a primitive wrapper * or String.</p> - * - * @param value The object to retrieve an id for. + * + * @param value The object to retrieve an id for. * @return The id for the object or <code>null</code>. */ private ObjectId retrieveId(Object value) { Class valueClass = value.getClass(); ObjectId id = null; - + // Although multiple accesses to Class objects are not handled // through ids we generate one for them, too. This allows us to detect // second time references to such objects in the writeObject method @@ -329,13 +329,13 @@ public class ScanEngine objects.put(value, id); } } - + return id; } /** Scans the argument and calls one of event methods. See * the introduction of this class for details. - * + * * @param expr The expression to serialize. */ public void writeExpression(Expression expr) @@ -344,7 +344,7 @@ public class ScanEngine Object[] args = expr.getArguments(); Object target = expr.getTarget(); Object value = null; - + try { value = expr.getValue(); @@ -366,9 +366,9 @@ public class ScanEngine if (methodName.equals("newInstance")) { id = retrieveId(value); - + Class ct = (Class) args[0]; - + if (ct.isPrimitive() || ct == Boolean.class || ct == Byte.class || ct == Short.class || ct == Integer.class || ct == Long.class || ct == Float.class || ct == Double.class) @@ -379,7 +379,7 @@ public class ScanEngine objectArrayInstantiation(ct.getName(), args[1].toString(), id); - + return; } else if (methodName.equals("get")) @@ -398,7 +398,7 @@ public class ScanEngine objectReference(id); end(); } - + return; } else if (methodName.equals("set")) @@ -407,7 +407,7 @@ public class ScanEngine return; } } - + id = retrieveId(value); if (target instanceof Class) @@ -517,7 +517,7 @@ public class ScanEngine /** Scans the argument and calls one of event methods. See * the introduction of this class for details. - * + * * @param stmt The statement to serialize. */ public void writeStatement(Statement stmt) @@ -553,7 +553,7 @@ public class ScanEngine /** Scans the argument and calls one of event methods. See * the introduction of this class for details. - * + * * @param o The object to serialize. */ public boolean writeObject(Object o) @@ -585,9 +585,9 @@ public class ScanEngine end(); return false; } - + // If our object has a corresponding ObjectId instance - // then generate an objectReference. This will + // then generate an objectReference. This will // initialize the id (= brings it in the "used" state) // when this is the first referal. objectReference(id); @@ -622,10 +622,10 @@ public class ScanEngine /** * Does a transition from one state to another using the given event. - * + * * <p>This involves saving the current state, retrieving it's * successor and setting it as the current state.</p> - * + * * @param transition One of {@link ScannerStates]'s transition constants. */ private void transition(int transition) @@ -633,7 +633,7 @@ public class ScanEngine parents.push(current); String stateName = current.getSuccessor(transition); - + if (DEBUG) { System.err.println("from state: " + current.getName() + "\n\troute: " @@ -641,9 +641,9 @@ public class ScanEngine + "\n\t\tto state: " + stateName); } - + ScannerState newState = (ScannerState) states.get(stateName); - + newState.enter(new Context(current.getName(), current.getCalls())); assert (newState != null) : "State '" + stateName + "' was not defined."; @@ -655,7 +655,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param methodName The name of the method which is called. */ void methodInvocation(String methodName) @@ -669,7 +669,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param methodName The name of the method which is called. * @param className The name of the class in which the method is called. */ @@ -684,7 +684,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param fieldName The name of the field whose value is retrieved. * @param className The name of the class in which the method is called. */ @@ -699,7 +699,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param className The name of the class in which the method is called. */ void classResolution(String className) @@ -713,7 +713,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param className The name of the class in which the method is called. * @param objectId An ObjectId instance which can be activated later. */ @@ -728,7 +728,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param primitiveName One of "boolean, "byte", "short", "int", "long" * , "float" or "double" * @param valueAsString The value of the primitive as a String. @@ -744,7 +744,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param arrayClassName The array's class name. * @param objectId An ObjectId instance which can be activated later. * @param lengthAsString The array's length as String. @@ -761,7 +761,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param arrayClassName The array's class name. * @param objectId An ObjectId instance which can be activated later. * @param lengthAsString The array's length as String. @@ -773,12 +773,12 @@ public class ScanEngine current.objectArrayInstantiation(arrayClassName, lengthAsString, objectId); } - + /** Event method that denotes the setting of a value in an array. * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param indexAsString The index to as a String. */ void arraySet(String indexAsString) @@ -792,7 +792,7 @@ public class ScanEngine * * <p>More details about this method can be found in this * class' introduction.</p> - * + * * @param indexAsString The index to as a String. */ void arrayGet(String indexAsString) @@ -836,7 +836,7 @@ public class ScanEngine } /** Event method that denotes a string. - * + * * @param string The string that should be written. */ void stringReference(String string) @@ -847,7 +847,7 @@ public class ScanEngine } /** Event method that denotes a reference to an existing object. - * + * * @param id The ObjectId to be used. */ void objectReference(ObjectId id) diff --git a/libjava/classpath/gnu/java/beans/encoder/ScannerState.java b/libjava/classpath/gnu/java/beans/encoder/ScannerState.java index 888478a8efd..14d63056eac 100644 --- a/libjava/classpath/gnu/java/beans/encoder/ScannerState.java +++ b/libjava/classpath/gnu/java/beans/encoder/ScannerState.java @@ -42,12 +42,12 @@ import java.util.HashMap; /** <p>Provides the infrastructure for the state machine and the transition * mechanism.</p> - * + * * <p>Each states knows a set of successor. There can be one successor for * every transition variant. Furthermore a state knows about a default * successor which is taken when there is no special setup for a * transition.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -105,42 +105,42 @@ public abstract class ScannerState * transition->successor's state name. */ HashMap transitions = new HashMap(); - + int calls; - + Context context; - + String name; - + final void init(String newName) { assert (name == null); - + name = newName; } - + final String getName() { return name; } - + final void enter(Context ctx) { calls++; context = ctx; - + enterImpl(ctx); } - + protected void enterImpl(Context ctx) { } - + final Context context() { return context; } - + final int getCalls() { return calls; @@ -148,10 +148,10 @@ public abstract class ScannerState /** * <p>Stores a successor's state name for a certain transition.</p> - * + * * <p>This method is only used at the configuration time of the state * machine.</p> - * + * * @param transition One of the transition constants. * @param stateName The state name of the successor. */ @@ -165,10 +165,10 @@ public abstract class ScannerState /** <p>Retrieves a the state name of a successor for the given transition * constant.</p> - * + * * <p>Returns the default successor's state name if no special setup was * prepared.</p> - * + * * @param transition One of the transition constants. * @return The state name of the successor. */ @@ -181,7 +181,7 @@ public abstract class ScannerState /** * Sets the name for the default successor state. - * + * * @param newDefaultSuccessor The default successor's state name. */ final void setDefaultSuccessor(String newDefaultSuccessor) @@ -203,7 +203,7 @@ public abstract class ScannerState String valueAsString); abstract void objectArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId); - + abstract void primitiveArrayInstantiation(String arrayClassName, String lengthAsString, ObjectId objectId); abstract void arraySet(String indexAsString); @@ -222,7 +222,7 @@ public abstract class ScannerState /** * <p>A special event that does not provoke a direct transition.</p> - * + * * <p>Instead the transition is done by the <code>ScanEngine</code>: It goes * back to the previous state and just uses this method to inform the state * about this happening.</p> @@ -232,5 +232,5 @@ public abstract class ScannerState void enter() { } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/StAXWriter.java b/libjava/classpath/gnu/java/beans/encoder/StAXWriter.java index fdb5f7d4571..da88c536111 100644 --- a/libjava/classpath/gnu/java/beans/encoder/StAXWriter.java +++ b/libjava/classpath/gnu/java/beans/encoder/StAXWriter.java @@ -45,7 +45,7 @@ import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; /** A {@link Writer} implementation based on the StAX API. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -54,7 +54,7 @@ public class StAXWriter implements Writer XMLStreamWriter writer; int indent = 0; - + public StAXWriter(OutputStream os) { try @@ -71,7 +71,7 @@ public class StAXWriter implements Writer } } - + public void flush() { if (writer != null) @@ -138,7 +138,7 @@ public class StAXWriter implements Writer } } - + public void writeEndNoChildren() { try diff --git a/libjava/classpath/gnu/java/beans/encoder/Writer.java b/libjava/classpath/gnu/java/beans/encoder/Writer.java index 57203d23e82..e08c786d80c 100644 --- a/libjava/classpath/gnu/java/beans/encoder/Writer.java +++ b/libjava/classpath/gnu/java/beans/encoder/Writer.java @@ -40,20 +40,20 @@ package gnu.java.beans.encoder; /** A <code>Writer</code> represents a simplified interface to an XML * writer that is used for the XML persistence mechanism. - * + * * <p>Its sole purpose is to allow multiple backends which may remove * the need to have certain APIs in the classpath. Eg. it is possible * to write a stripped down XML Writer that does not rely on SAX, StAX * or DOM APIs.</p> - * + * * <p>The caller may assume that every action is done immediately. However * it is possible that the underlying implementation uses buffering streams. * To make sure the data is written call the {@link flush} method.</p> - * + * * <p>The <code>Writer</code> implementation should care about the formatting * of the XML stream making it possible to generate three types of formats using * a special method invocation chain.</p> - * + * * <p>Write * <code> * <element/> @@ -61,13 +61,13 @@ package gnu.java.beans.encoder; * by issuing <code>write("element", true)</code> (or any of the other * write-variants that allows specifying the <code>isEmpty</code> argument) * and <code>writeEnd(true)</code>.</p> - * + * * <p>Write * <code> * <element>body</element> * </code> * by issuing <code>writeNoChildren("element", "body")</code> and <code>writeNoChildrenEnd()</code>.</p> - * + * * <p> * Write * <code> @@ -80,7 +80,7 @@ package gnu.java.beans.encoder; * by issuing <code>write("element", false)</code> (or any of the other * write-variants that allows specifying the <code>isEmpty</code> argument) * and <code>writeEnd(false)</code>.</p> - * + * * <p>Note: It is important that the values of <code>isEmpty</code> and * <code>wasEmpty</code> match. Otherwise strange things might happen to * the layout.</p> @@ -90,40 +90,40 @@ package gnu.java.beans.encoder; */ public interface Writer { - // TODO: This interface's design is not the best. Feel free to + // TODO: This interface's design is not the best. Feel free to // improve it as you like. /** Writes the XML preamble. */ void writePreamble(); /** Writes the end of an XML tag. - * + * * <p>If your tag has not generated any body text or child * elements provide <code>true</code> as the argument to generate - * more space efficient variant of the tag.>/p> - * + * more space efficient variant of the tag.>/p> + * * @param wasEmpty Whether the tag was empty or not. */ void writeEnd(boolean wasEmpty); - /** Writes an XML tag without any attributes. - * + /** Writes an XML tag without any attributes. + * * @param tagName The name of the tag to write. * @param empty Whether the element has child elements. */ void write(String tagName, boolean empty); /** Writes an XML tag with one attribute name and value. - * + * * @param tagName The name of the tag to write. - * @param attributeName The name of attribute. + * @param attributeName The name of attribute. * @param attributeValue The attribute's value. * @param empty Whether the element has child elements. */ void write(String tagName, String attributeName, String attributeValue, boolean empty); /** Writes an XML tag with multiple attributes and a body text. - * + * * @param tagName The name of the tag to write. * @param value The element's body content. * @param attributeNames A set of attribute names. @@ -134,7 +134,7 @@ public interface Writer String[] attributeValues, boolean empty); /** Writes an XML tag with multiple attributes without a body text. - * + * * @param tagName The name of the tag to write. * @param attributeNames A set of attribute names. * @param attributeValues A set of attribute values. @@ -144,7 +144,7 @@ public interface Writer /** Writes an XML tag with no attributes but with a body text * that may have child elements. - * + * * @param tagName The name of the tag to write. * @param value The element's body content. */ @@ -152,14 +152,14 @@ public interface Writer /** Writes an XML tag with no attributes but with a body text * that does not have child elements. - * + * * @param tagName The name of the tag to write. * @param value The element's body content. */ void writeNoChildren(String tagName, String value); - + /** Writes the end of an XML tag that has no child elements. - * + * * <p>Must be used in combination with {@link writeNoChildren} only.</p> */ void writeEndNoChildren(); diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java b/libjava/classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java index a9aef89c772..51e00c361ff 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/ArrayInstantiation.java @@ -42,7 +42,7 @@ import gnu.java.beans.encoder.ObjectId; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting the instantiation of an array. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/Array_Get.java b/libjava/classpath/gnu/java/beans/encoder/elements/Array_Get.java index ca2ce0fa663..912ecebb5d0 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/Array_Get.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/Array_Get.java @@ -42,7 +42,7 @@ import gnu.java.beans.encoder.Writer; /** * Generates an XML element denoting the retrieval of an array value. - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public class Array_Get extends Element diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/ClassResolution.java b/libjava/classpath/gnu/java/beans/encoder/elements/ClassResolution.java index 8e640d18350..cb736d5c0c0 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/ClassResolution.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/ClassResolution.java @@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting the resolution of a class. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -58,7 +58,7 @@ public class ClassResolution extends Element { writer.writeNoChildren("class", className); } - + public void writeEnd(Writer writer) { writer.writeEndNoChildren(); diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/Element.java b/libjava/classpath/gnu/java/beans/encoder/elements/Element.java index 5681d2b76a0..a8c0ecdf71f 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/Element.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/Element.java @@ -45,11 +45,11 @@ import gnu.java.beans.encoder.ObjectId; import gnu.java.beans.encoder.Writer; /** <code>Element</code> is the base class for the object tree elements. - * + * * <p>It provides the neccessary infrastructure every element subclass * needs in order to interact with the {@link gnu.java.beans.encoder.Root} * class.</p> - * + * * @author Robert Schuster (robertschuster@fsfe.org) */ public abstract class Element @@ -58,100 +58,100 @@ public abstract class Element * Stores the child elements. */ private LinkedList children = new LinkedList(); - + /** * An optional ObjectId instance which is needed for certain subclasses * only. */ private ObjectId objectId; - + /** Sets an {@link gnu.java.beans.encoder.ObjectId} instance in this * <code>Element</code>. - * + * * <p>This can only be done once.</p> - * + * * @param objectId An ObjectId instance. */ public final void initId(ObjectId objectId) { assert (this.objectId == null); assert (objectId != null); - + this.objectId = objectId; } /** Adds a child element to this <code>Element</code>. - * + * * @param elem The new child. */ public final void addChild(Element elem) { children.add(elem); } - + /** Removes the child element added last. */ public final void removeLast() { children.removeLast(); } - + /** Provides access to the child elements via an iterator. - * + * * @return An iterator for the child elements. */ public final Iterator iterator(){ return children.iterator(); } - + /** Clears all the stored child elements. - * + * */ public final void clear() { - children.clear(); + children.clear(); } - + /** Returns whether this element contains child elements. - * + * * <p>This method is useful to decide which formatting variant * for the XML element can be chosen.</p> - * + * * @return Whether the element has child elements. */ public final boolean isEmpty() { - return children.isEmpty(); + return children.isEmpty(); } - + /** Retrieves the element's {@link gnu.java.beans.encoder.ObjectId} instance * if it has one. - * + * * @return The ObjectId instance or <code>null</code>. */ public final ObjectId getId() { return objectId; } - + /** Writes the opening XML tag. - * + * * @param writer The writer to be used for XML writing. */ public abstract void writeStart(Writer writer); - + /** Writes the closing XML tag. - * + * * <p>By default this does <code>writer.writeEnd(children.isEmpty())</code>. * Override if neccessary, for example when using the * {@link gnu.java.beans.encoder.Writer#writeNoChildren}</code> method - * variants. - * + * variants. + * * @param writer The writer to be used for XML writing. */ public void writeEnd(Writer writer) { writer.writeEnd(children.isEmpty()); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/List_Get.java b/libjava/classpath/gnu/java/beans/encoder/elements/List_Get.java index e73afa8e917..c14ab91f952 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/List_Get.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/List_Get.java @@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting the retrieval of a list's element. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -52,5 +52,5 @@ public class List_Get extends Element { writer.write("object", "get"); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/List_Set.java b/libjava/classpath/gnu/java/beans/encoder/elements/List_Set.java index 03c73fd2089..3e7cca62800 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/List_Set.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/List_Set.java @@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting the setting of a list's element. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -52,5 +52,5 @@ public class List_Set extends Element { writer.write("object", "set"); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/MethodInvocation.java b/libjava/classpath/gnu/java/beans/encoder/elements/MethodInvocation.java index d5b317496d5..1de5bb62dc4 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/MethodInvocation.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/MethodInvocation.java @@ -41,22 +41,22 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting a non-static method call. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ public class MethodInvocation extends Element { final String methodName; - + public MethodInvocation(String newMethodName) { methodName = newMethodName; } - + public void writeStart(Writer writer) { writer.write("void", "method", methodName, isEmpty()); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/NullObject.java b/libjava/classpath/gnu/java/beans/encoder/elements/NullObject.java index 599c4d85fc3..211e2a74bc3 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/NullObject.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/NullObject.java @@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting the <code>null</code> value. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java b/libjava/classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java index 692227d59c5..98614809f06 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/ObjectInstantiation.java @@ -42,7 +42,7 @@ import gnu.java.beans.encoder.ObjectId; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting the instantiation of an object. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/ObjectReference.java b/libjava/classpath/gnu/java/beans/encoder/elements/ObjectReference.java index a44c2ee6055..13a597a5849 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/ObjectReference.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/ObjectReference.java @@ -42,7 +42,7 @@ import gnu.java.beans.encoder.ObjectId; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting referencing an existing object. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ @@ -53,7 +53,7 @@ public class ObjectReference extends Element public ObjectReference(ObjectId newId) { id = newId; - + // Initializing the Id here is making sure it gets // actually used. This step modifies the Id instance // in other elements. @@ -64,5 +64,5 @@ public class ObjectReference extends Element { writer.write("object", "idref", id.toString(), isEmpty()); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java b/libjava/classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java index db08edbf8a0..ae34b9dad28 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/PrimitiveInstantiation.java @@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting a primitive data value. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java b/libjava/classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java index 7ed935d49a0..7fcbf520343 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/StaticFieldAccess.java @@ -41,7 +41,7 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** Generates an XML element denoting a static method call. - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java b/libjava/classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java index 40c46a5346b..92d49dc41c2 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/StaticMethodInvocation.java @@ -42,26 +42,26 @@ package gnu.java.beans.encoder.elements; import gnu.java.beans.encoder.Writer; /** - * + * * @author Robert Schuster (robertschuster@fsfe.org) * */ public class StaticMethodInvocation extends Element { final String className; - + final String methodName; - + public StaticMethodInvocation(String newClassName, String newMethodName) { className = newClassName; methodName = newMethodName; } - + public void writeStart(Writer writer) { writer.write("void", new String[] { "class", "method" }, new String[] { className, methodName }, isEmpty()); } - + } diff --git a/libjava/classpath/gnu/java/beans/encoder/elements/StringReference.java b/libjava/classpath/gnu/java/beans/encoder/elements/StringReference.java index c368e652851..7e6787da32c 100644 --- a/libjava/classpath/gnu/java/beans/encoder/elements/StringReference.java +++ b/libjava/classpath/gnu/java/beans/encoder/elements/StringReference.java @@ -54,7 +54,7 @@ public class StringReference extends Element { writer.writeNoChildren("string", string); } - + public void writeEnd(Writer writer) { writer.writeEndNoChildren(); |