commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/builder ToStringBuilder.java
Date Fri, 18 Apr 2003 07:01:48 GMT
ggregory    2003/04/18 00:01:48

  Modified:    lang/src/java/org/apache/commons/lang/builder
                        ToStringBuilder.java
  Log:
  Address Checkstyle report issues as reported by Henri (http://www.generationjava.com/maven/jakarta-commons/lang/)
  
  Revision  Changes    Path
  1.20      +19 -4     jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringBuilder.java
  
  Index: ToStringBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/builder/ToStringBuilder.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- ToStringBuilder.java	8 Apr 2003 22:35:40 -0000	1.19
  +++ ToStringBuilder.java	18 Apr 2003 07:01:47 -0000	1.20
  @@ -59,7 +59,7 @@
   import java.util.Set;
   
   /**
  - * <p><code>toString()</code> generation routines.</p>
  + * <p>Builds <code>toString()</code> values.</p>
    *
    * <p>This class enables a good and consistent <code>toString()</code>
to be built for any
    * class or object. This class aims to simplify the process by:</p>
  @@ -141,14 +141,17 @@
        * The default style of output to use
        */
       private static ToStringStyle defaultStyle = ToStringStyle.DEFAULT_STYLE;
  +    
       /**
        * Current toString buffer
        */
       private final StringBuffer buffer;
  +    
       /**
        * The style of output to use
        */
       private final ToStringStyle style;
  +    
       /**
        * The object being output
        */
  @@ -166,6 +169,8 @@
       /**
        * Returns <code>true</code> if the registry contains the given object.
        * Used by the reflection methods to avoid infinite loops.
  +     * 
  +     * @param value The object to lookup in the registry.
        * @return boolean <code>true</code> if the registry contains the given
object.
        */
       static boolean isRegistered(Object value) {
  @@ -175,6 +180,8 @@
       /**
        * Registers the given object.
        * Used by the reflection methods to avoid infinite loops.
  +     * 
  +     * @param value The object to register.
        */
       static void register(Object value) {
           getReflectionRegistry().add(value);
  @@ -183,6 +190,8 @@
       /**
        * Unregisters the given object.
        * Used by the reflection methods to avoid infinite loops.
  +     * 
  +     * @param value The object to unregister.
        */
       static void unregister(Object value) {
           getReflectionRegistry().remove(value);
  @@ -396,7 +405,11 @@
        * @return the String result
        * @throws IllegalArgumentException if the Object is <code>null</code>
        */
  -    public static String reflectionToString(Object object, ToStringStyle style, boolean
outputTransients, Class reflectUpToClass) {
  +    public static String reflectionToString(
  +        Object object,
  +        ToStringStyle style,
  +        boolean outputTransients,
  +        Class reflectUpToClass) {
           if (style == null) {
               style = getDefaultStyle();
           }
  @@ -454,7 +467,9 @@
                               // append a simple Object.toString style string.
                               builder.getStyle().appendFieldStart(builder.getStringBuffer(),
fieldName);
                               builder.appendAsObjectToString(fieldValue);
  -                            // The recursion out of "builder.append(fieldName, fieldValue);"
below will append the field 
  +                            // The recursion out of 
  +                            //    builder.append(fieldName, fieldValue); 
  +                            // below will append the field 
                               // end marker.
                           } else {
                               try {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message