From b78378ca53cb0e131ef04c79e54cbf4a897a1dc5 Mon Sep 17 00:00:00 2001 From: Oliver Heger Date: Sat, 19 Mar 2011 16:42:55 +0000 Subject: [PATCH] Checkstyle and trailing spaces. git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1083218 13f79535-47bb-0310-9956-ffa450edef68 --- .../builder/ReflectionToStringBuilder.java | 148 +++++++++--------- 1 file changed, 76 insertions(+), 72 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java index bc3fdbb1a..efed58c3b 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java +++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -32,34 +32,34 @@ *

* Assists in implementing {@link Object#toString()} methods using reflection. *

- * + * *

* This class uses reflection to determine the fields to append. Because these fields are usually private, the class * uses {@link java.lang.reflect.AccessibleObject#setAccessible(java.lang.reflect.AccessibleObject[], boolean)} to * change the visibility of the fields. This will fail under a security manager, unless the appropriate permissions are * set up correctly. *

- * + * *

* A typical invocation for this method would look like: *

- * + * *
  * public String toString() {
  *   return ReflectionToStringBuilder.toString(this);
  * }
- * - * - * + * + * + * *

* You can also use the builder to debug 3rd party objects: *

- * + * *
  * System.out.println("An object: " + ReflectionToStringBuilder.toString(anObject));
- * - * - * + * + * + * *

* A subclass can control field output by overriding the methods: *

- * + * * @param field * The Field to test. * @return Whether or not to append the given Field. @@ -514,12 +518,12 @@ protected boolean accept(Field field) { *

* Appends the fields and values defined by the given object of the given Class. *

- * + * *

* If a cycle is detected as an object is "toString()'ed", such an object is rendered as if * Object.toString() had been called and not implemented by the object. *

- * + * * @param clazz * The class of object parameter */ @@ -560,7 +564,7 @@ public String[] getExcludeFieldNames() { *

* Gets the last super class to stop appending fields for. *

- * + * * @return The last super class to stop appending fields for. */ public Class getUpToClass() { @@ -571,16 +575,16 @@ public Class getUpToClass() { *

* Calls java.lang.reflect.Field.get(Object). *

- * + * * @param field * The Field to query. * @return The Object from the given Field. - * + * * @throws IllegalArgumentException * see {@link java.lang.reflect.Field#get(Object)} * @throws IllegalAccessException * see {@link java.lang.reflect.Field#get(Object)} - * + * * @see java.lang.reflect.Field#get(Object) */ protected Object getValue(Field field) throws IllegalArgumentException, IllegalAccessException { @@ -591,7 +595,7 @@ protected Object getValue(Field field) throws IllegalArgumentException, IllegalA *

* Gets whether or not to append static fields. *

- * + * * @return Whether or not to append static fields. * @since 2.1 */ @@ -603,7 +607,7 @@ public boolean isAppendStatics() { *

* Gets whether or not to append transient fields. *

- * + * * @return Whether or not to append transient fields. */ public boolean isAppendTransients() { @@ -614,7 +618,7 @@ public boolean isAppendTransients() { *

* Append to the toString an Object array. *

- * + * * @param array * the array to add to the toString * @return this @@ -628,7 +632,7 @@ public ReflectionToStringBuilder reflectionAppendArray(Object array) { *

* Sets whether or not to append static fields. *

- * + * * @param appendStatics * Whether or not to append static fields. * @since 2.1 @@ -641,7 +645,7 @@ public void setAppendStatics(boolean appendStatics) { *

* Sets whether or not to append transient fields. *

- * + * * @param appendTransients * Whether or not to append transient fields. */ @@ -651,7 +655,7 @@ public void setAppendTransients(boolean appendTransients) { /** * Sets the field names to exclude. - * + * * @param excludeFieldNamesParam * The excludeFieldNames to excluding from toString or null. * @return this @@ -670,7 +674,7 @@ public ReflectionToStringBuilder setExcludeFieldNames(String[] excludeFieldNames *

* Sets the last super class to stop appending fields for. *

- * + * * @param clazz * The last super class to stop appending fields for. */ @@ -688,7 +692,7 @@ public void setUpToClass(Class clazz) { *

* Gets the String built by this builder. *

- * + * * @return the built string */ @Override