title: Java Reflection get only methods of subclass (without equals, hashcode etc)
body: <p>Is there a way to get the methods of an Class object, without getting the methods defined by the Object class?</p>
  
  <p>Right now I am using getDeclaredMethods() to look for a specific method with a list of parameters.</p>
  
  <p>My problem is that this also returns functions like
  "equals", "hashCode", etc...
  and thus it could be ambiguous between these functions and the one I'm looking for.</p>
  
  <p>Looking at the documentation, it says that it only returns the public methods defined by this class (or in my case an interface), and my objects never override these methods</p>
  
  <p>Is there any workaround for this?</p>
  
  <p>Example:</p>
  
  <pre><code>class Test implements ITest {
     void myMethod() {...}
  }
  </code></pre>
  
  <p>and in my code I have something like</p>
  
  <pre><code>Object o = new Test();
  for (Method m : o.getClass().getDeclaredMethods()) { 
      System.out.println(m.getName()...);
  }
  </code></pre>
  
  <p>and this prints me methods defined in the Object class</p>