title: Check if subclass implements an interface in parent class?
body: <p>I know how to check if an object implements an interface. But how do I check in the parent class if the subclass implements the interface?</p>
  
  <p>Suppose </p>
  
  <pre><code>class A {
  
     //What can I do to check here?
  
  }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>class B extends A implements Listener{
  
  
    }
  </code></pre>
  
  <p>and </p>
  
  <pre><code>class C extends A {
  
  
    }
  </code></pre>
  
  <p>Here <code>B</code> implements the interface <code>Listener</code> but <code>C</code> does not. How do I check it? </p>