Java Reflection Interface Get getInterfacesList(Class clazz)

Here you can find the source of getInterfacesList(Class clazz)

Description

get Interfaces List

License

LGPL

Declaration

private static List<Class> getInterfacesList(Class clazz) 

Method Source Code

//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;
    }
}

Related

  1. getInterfaces(Class clazz)
  2. getInterfaces(Class clazz)
  3. getInterfaces(final Class type)
  4. getInterfaces(Object owner, String[] interfaceStrings)
  5. getInterfacesForClass(Class type)
  6. getParentAllInterfaces(Class pojoClass)
  7. getPortNameAndSuffixFromInterfaceName( String intfName)