diff options
Diffstat (limited to 'api/src/main/java/org/osjava/jardiff/FieldInfo.java')
-rw-r--r-- | api/src/main/java/org/osjava/jardiff/FieldInfo.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/api/src/main/java/org/osjava/jardiff/FieldInfo.java b/api/src/main/java/org/osjava/jardiff/FieldInfo.java index ef86ea7..c159ba9 100644 --- a/api/src/main/java/org/osjava/jardiff/FieldInfo.java +++ b/api/src/main/java/org/osjava/jardiff/FieldInfo.java @@ -16,6 +16,8 @@ */ package org.osjava.jardiff; +import java.util.Arrays; + /** * Information about a field of a class. * @@ -47,8 +49,8 @@ public final class FieldInfo extends AbstractInfo * @param signature The signature of this field. * @param value The initial value of the field. */ - public FieldInfo(int access, String name, String desc, String signature, - Object value) { + public FieldInfo(final int access, final String name, final String desc, final String signature, + final Object value) { super(access, name); this.desc = desc; this.signature = signature; @@ -73,4 +75,9 @@ public final class FieldInfo extends AbstractInfo public final Object getValue() { return value; } + + public String toString() { + final String t = null != value ? value.getClass().getName() : null; + return "desc["+desc+"], sig["+signature+"], value[type "+t+", data "+value; + } } |