title: How to determine if a Java Class implements a particular Interface
body: <p>I'm trying to use reflection to determine whether a passed-in class implements an <code>IsWdidget</code> interface:</p>
  
  <pre><code>public boolean isAWidget(Class&lt;?&gt; clzz) {
      Class&lt;?&gt; runtimeClass = ClassLoader.getSystemClassLoader().loadClass(clzz.getName());
      Class&lt;?&gt;[] impls = runtimeClass.getInterfaces();
      for(Class&lt;?&gt; clz : impls)
          if(clz.getName().equals(IsWidget.class.getName()))
              return true;
  
      return false;
  }
  </code></pre>
  
  <p>Is this the best/most effecient way of determining this? I also see a <code>IsWidget.class.isAssignableFrom(Class&lt;?&gt;)</code> method...</p>