commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brit...@apache.org
Subject [4/8] [lang] Better JavaDoc for ToStringExclude
Date Mon, 04 May 2015 19:47:19 GMT
Better JavaDoc for ToStringExclude


Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/f24344c2
Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/f24344c2
Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/f24344c2

Branch: refs/heads/master
Commit: f24344c2578a829acdfec914db27a5bbe0fc09f7
Parents: 0e67448
Author: Benedikt Ritter <britter@apache.org>
Authored: Mon May 4 21:21:32 2015 +0200
Committer: Benedikt Ritter <britter@apache.org>
Committed: Mon May 4 21:21:32 2015 +0200

----------------------------------------------------------------------
 .../lang3/builder/ReflectionToStringBuilder.java      | 14 ++++++++++++++
 .../apache/commons/lang3/builder/ToStringExclude.java |  3 ++-
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f24344c2/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
----------------------------------------------------------------------
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 5904469..83dba01 100644
--- a/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
+++ b/src/main/java/org/apache/commons/lang3/builder/ReflectionToStringBuilder.java
@@ -79,6 +79,10 @@ import org.apache.commons.lang3.ClassUtils;
  * }
  * </pre>
  * <p>
+ * Alternatively the {@link ToStringExclude} annotation can be used to exclude fields from
being incorporated in the 
+ * result.
+ * </p>
+ * <p>
  * The exact format of the <code>toString</code> is determined by the {@link
ToStringStyle} passed into the constructor.
  * </p>
  *
@@ -113,6 +117,8 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
      * @return the String result
      * @throws IllegalArgumentException
      *             if the Object is <code>null</code>
+     *
+     * @see ToStringExclude
      */
     public static String toString(final Object object) {
         return toString(object, null, false, false, null);
@@ -145,6 +151,8 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
      * @return the String result
      * @throws IllegalArgumentException
      *             if the Object or <code>ToStringStyle</code> is <code>null</code>
+     *
+     * @see ToStringExclude
      */
     public static String toString(final Object object, final ToStringStyle style) {
         return toString(object, style, false, false, null);
@@ -183,6 +191,8 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
      * @return the String result
      * @throws IllegalArgumentException
      *             if the Object is <code>null</code>
+     *
+     * @see ToStringExclude
      */
     public static String toString(final Object object, final ToStringStyle style, final boolean
outputTransients) {
         return toString(object, style, outputTransients, false, null);
@@ -228,6 +238,8 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
      * @return the String result
      * @throws IllegalArgumentException
      *             if the Object is <code>null</code>
+     * 
+     * @see ToStringExclude
      * @since 2.1
      */
     public static String toString(final Object object, final ToStringStyle style, final boolean
outputTransients, final boolean outputStatics) {
@@ -279,6 +291,8 @@ public class ReflectionToStringBuilder extends ToStringBuilder {
      * @return the String result
      * @throws IllegalArgumentException
      *             if the Object is <code>null</code>
+     * 
+     * @see ToStringExclude
      * @since 2.1
      */
     public static <T> String toString(

http://git-wip-us.apache.org/repos/asf/commons-lang/blob/f24344c2/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java b/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
index 4b73599..c080e31 100755
--- a/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
+++ b/src/main/java/org/apache/commons/lang3/builder/ToStringExclude.java
@@ -23,7 +23,8 @@ import java.lang.annotation.Target;
 import java.lang.annotation.RetentionPolicy;
 
 /**
- * Use this annotation to builds a String excluding the annotated field.
+ * Use this annotation to exclude a field from being being used by
+ * the {@link ReflectionToStringBuilder}.
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)


Mime
View raw message