Java Class Load getClasses(Class t)

Here you can find the source of getClasses(Class t)

Description

get Classes

License

Open Source License

Declaration

public static List<Class> getClasses(Class t) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.ArrayList;
import java.util.List;

public class Main {

    public static List<Class> getClasses(Class t) {
        List<Class> list = new ArrayList<Class>();
        list.add(t);//from   ww w  .  j a  v  a 2s  . c o  m
        Class clazz = t.getSuperclass();
        while (!clazz.equals(Object.class)) {
            list.add(clazz);
            clazz = clazz.getSuperclass();
        }
        return list;
    }
}

Related

  1. getClass(String name)
  2. getClass(String name)
  3. getClass(String upnpDataType)
  4. getClassDescriptor(Class type)
  5. getClasses(Class infoClass)
  6. getClasses(Object... objects)
  7. getClasses(String input)
  8. getClassesFromPaths(String[] classpaths)
  9. getClassesOfType(T[] l, Class type)