I have changed the method findMethodByHash and my code is working now. Is it a general 
solution?

   public static Method findMethodByHash(Class clazz, long hash) throws Exception
   {
       System.out.println("findMethodByHash " + clazz.getName());
      Method[] methods = clazz.getDeclaredMethods();
      for (int i = 0; i < methods.length; i++)
      {
          System.out.println("methodHash " + methods.getName() + " " + 
methodHash(methods));
         if (methodHash(methods) == hash) return methods;
      }
      System.out.println("clazz.getSuperclass() " + clazz.getSuperclass());
      if (clazz.getSuperclass() != null)
      {
         return findMethodByHash(clazz.getSuperclass(), hash);
      }
      
      Class[] intfs = clazz.getInterfaces();
      if(intfs != null || intfs.length != 0 ){
          for (int i = 0; i < intfs.length; i++) {
            Method result = findMethodByHash(intfs, hash);
            
            if(result != null)
                return result;
        }
      }
      
      return null;
   }

Thanks, 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3849143#3849143

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3849143


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to