src/main/java/org/jboss/util/Classes.java
public static Class[] getAllUniqueInterfaces(Class c)
   {
      Set uniqueIfaces = new HashSet();
      while (c != null )
      {
         Class[] ifaces = c.getInterfaces();
         for (int n = 0; n < ifaces.length; n ++)
         {
            uniqueIfaces.add(ifaces[n]);
         }
         c = c.getSuperclass();
      }
      return (Class[])uniqueIfaces.toArray(new Class[uniqueIfaces.size()]);
   }
public static Class[] getAllUniqueInterfaces(Class c)
   {
      Set uniqueIfaces = new HashSet();
      while (c != null )
      {
         Class[] ifaces = c.getInterfaces();
         for (int n = 0; n < ifaces.length; n ++)
         {
            uniqueIfaces.add(ifaces[n]);
         }
         c = c.getSuperclass();
      }
      return (Class[])uniqueIfaces.toArray(new Class[uniqueIfaces.size()]);
   }
public static Class [ ] getAllUniqueInterfaces ( Class c ) { Set uniqueIfaces = new HashSet ( ) ; while ( c != null ) { Class [ ] ifaces = c . getInterfaces ( ) ; for ( int n = 0 ; n < ifaces . length ; n ++ ) { uniqueIfaces . add ( ifaces [ n ] ) ; } c = c . getSuperclass ( ) ; } return ( Class [ ] ) uniqueIfaces . toArray ( new Class [ uniqueIfaces . size ( ) ] ) ; }
Returns an array containing all the unique interfaces implemented
by the argument class c and all its superclasses. Interfaces that
appear multiple times through inheritence are only accounted for once.

@param c - the class to start scanning for interfaces
@return the interfaces
Returns an array containing all the unique interfaces implemented by the argument class c and all its superclasses . Interfaces that appear multiple times through inheritence are only accounted for once .