Here you can find the source of getInterfacesList(Class clazz)
private static List<Class> getInterfacesList(Class clazz)
//package com.java2s; //License from project: LGPL import java.util.*; public class Main { private static List<Class> getInterfacesList(Class clazz) { List<Class> result = new ArrayList<Class>(); Class[] interfaces = clazz.getInterfaces(); if (null != interfaces && interfaces.length > 0) { for (Class intrfc : interfaces) { result.add(intrfc);//from w w w .j a v a 2 s . c o m // recursively checks childs result.addAll(getInterfacesList(intrfc)); } } return result; } }