git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@345 30ef5769-5b8d-40dd-aea6-55b5d6557bb3tags/rel_3_17_1_ga
@@ -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; |
@@ -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 |