title: getMethod avoiding parent classes
body: <p>While using getMethod(), I've run into a problem. The class I am calling getMethod() on has many parent methods. However, I dont want getMethod to notice the methods of the parent class, only the specific class I am looking at. For example...</p>
  
  <pre><code>class superClass {
      boolean equals(Object obj) {
          ....
      }
  }
  
  ...
  
  import superClass
  
  class subClass {
      ...
  }
  </code></pre>
  
  <p>Now if I am using getMethod like this...</p>
  
  <pre><code>try{
     Class[] args = new Class[1];
     args[0] = Object.class;
     Method equalsMethod = subClass.getMethod("equals", args);
  }
  
  catch(NoSuchMethodException ex){
  ...
  }
  </code></pre>
  
  <p>I don't want this to pull in the equals method from the superClass, which it currently is doing. All I want to know is if the class I am calling getMethod on (in this case subClass) contains the method equals().</p>
  
  <p>Any way of doing this? Any help would be appreciated.</p>