]> source.dussan.org Git - javassist.git/commitdiff
reformatted.
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 18 Jul 2006 14:59:22 +0000 (14:59 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 18 Jul 2006 14:59:22 +0000 (14:59 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@300 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/annotation/AnnotationImpl.java

index be66df4f1cfef93ea9a5927097ec7a6b7ea95fb4..9d8e49bc7c2c286df7060e5dd97f8011d8b7f49e 100644 (file)
@@ -63,6 +63,10 @@ public class AnnotationImpl implements InvocationHandler {
 
     /**
      * Executes a method invocation on a proxy instance.
+     * The implementations of <code>toString</code>, <code>equals</code>,
+     * and <code>hashCode</code> are directly supplied by the
+     * <code>AnnotationImpl</code>.  The <code>annotationType</code> method
+     * is also available on the proxy instance.
      */
     public Object invoke(Object proxy, Method method, Object[] args)
         throws Throwable
@@ -85,11 +89,9 @@ public class AnnotationImpl implements InvocationHandler {
             else if ("hashCode".equals(name))
                 return new Integer(hashCode());
         }
-        else if ("annotationType".equals(name) && method.getParameterTypes().length == 0)
-        {
+        else if ("annotationType".equals(name)
+                 && method.getParameterTypes().length == 0)
            return classLoader.loadClass(getTypeName());
-        }
-
 
         MemberValue mv = annotation.getMemberValue(name);
         if (mv == null)