java.lang.Class.getGenericInterfaces()


java.lang.Class.getGenericInterfaces()

package com.codingdict;



import java.lang.reflect.*;



public class ClassDemo {



   public static void main(String []args) {         



      ClassDemo d = new ClassDemo();

      Class c = d.getClass();



      Type[] t = c.getGenericInterfaces();

      if(t.length != 0) {

         for(Type val : t) {

            System.out.println(val.toString());

         }

      } else {

         System.out.println("Interfaces are not implemented...");

      }

   }

}