From c04c787ab1c4416598b7180b35e94a2b63d07d0c Mon Sep 17 00:00:00 2001 From: chiba Date: Fri, 2 Feb 2007 10:52:45 +0000 Subject: updated javadoc comments. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@345 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/bytecode/annotation/Annotation.java | 9 ++++++++- src/main/javassist/bytecode/annotation/AnnotationImpl.java | 7 +++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/main/javassist/bytecode/annotation/Annotation.java b/src/main/javassist/bytecode/annotation/Annotation.java index 34f021e1..a2cef9a7 100644 --- a/src/main/javassist/bytecode/annotation/Annotation.java +++ b/src/main/javassist/bytecode/annotation/Annotation.java @@ -208,6 +208,9 @@ public class Annotation { members.put(name, pair); } + /** + * Returns a string representation of the annotation. + */ public String toString() { StringBuffer buf = new StringBuffer("@"); buf.append(getTypeName()); @@ -313,7 +316,11 @@ public class Annotation { pair.value.write(writer); } } - + + /** + * Returns true if the given object represents the same annotation + * as this object. The equality test checks the member values. + */ public boolean equals(Object obj) { if (obj == this) return true; diff --git a/src/main/javassist/bytecode/annotation/AnnotationImpl.java b/src/main/javassist/bytecode/annotation/AnnotationImpl.java index e83812f2..1eb92959 100644 --- a/src/main/javassist/bytecode/annotation/AnnotationImpl.java +++ b/src/main/javassist/bytecode/annotation/AnnotationImpl.java @@ -176,7 +176,10 @@ public class AnnotationImpl implements InvocationHandler { throw new RuntimeException("no default value: " + classname + "." + name + "()"); } - + + /** + * Returns a hash code value for this object. + */ public int hashCode() { if (cachedHashCode == Integer.MIN_VALUE) { int hashCode = 0; @@ -221,7 +224,7 @@ public class AnnotationImpl implements InvocationHandler { } /** - * Check that another annotation equals ourselves + * Check that another annotation equals ourselves. * * @param obj the other annotation * @return the true when equals false otherwise -- cgit v1.2.3