List of utility methods to do Reflection Super Class
void | getSuperClasses(Class clazz, Set get Super Classes Class superClass = clazz.getSuperclass(); if (superClass == null) { return; result.add(superClass); getSuper(superClass, result); |
Class[] | getSuperClasses(Class clz, boolean reverseOrder) get Super Classes return getSuperClasses(clz, reverseOrder, false);
|
Set | getSuperclasses(Class from) get Superclasses Set<Class> superclasses = new HashSet<Class>(); collectInterfaces(from, superclasses); while (!from.equals(Object.class) && !from.isInterface()) { superclasses.add(from.getSuperclass()); from = from.getSuperclass(); collectInterfaces(from, superclasses); return superclasses; ... |
List | getSuperClasses(Class> c) get Super Classes List<Class<?>> classes = new ArrayList<Class<?>>(); classes.add(c); while (c != null) { c = c.getSuperclass(); if ((c == null) || c.getClass().equals(Object.class)) break; classes.add(c); return classes; |
List | getSuperclasses(Class> clazz) Gets a if (clazz == null) return null; List<Class<?>> classes = new ArrayList<Class<?>>(); Class<?> superclass = clazz.getSuperclass(); while (superclass != null) { classes.add(superclass); superclass = superclass.getSuperclass(); return classes; |
List | getSuperClasses(Class> clazz) Get super class list of a class. ArrayList<Class<?>> superClasses = new ArrayList<Class<?>>(); findSuperClasses(clazz, superClasses); return superClasses; |
List | getSuperclasses(Class> clazz) Returns a list of all superclasses and implemented interfaces by the supplied class, recursively to the base, up to but excluding Object.class. List<Class<?>> accumulate = new ArrayList<Class<?>>(); while (clazz != Object.class) { accumulate.add(clazz); clazz = clazz.getSuperclass(); int supers = accumulate.size(); for (int i = 0; i < supers; ++i) { appendSuperclasses(accumulate.get(i), accumulate); ... |
List | getSuperClasses(Class> cls) get Super Classes List<Class<?>> results = new ArrayList<Class<?>>(); Class<?> cur = cls; while (cur != null) { results.add(cur); cur = cur.getSuperclass(); return results; |
List | getSuperClasses(Class> entryClass) Build a super classes List(Class(? List<Class<? extends Object>> list = new ArrayList<Class<? extends Object>>(); Class<? extends Object> superClazz = entryClass.getSuperclass(); while (superClazz != null) { list.add(superClazz); superClazz = superClazz.getSuperclass(); return list; |
Collection | getSuperclasses(Class> the_class) Method to return the superclasses for a class. List<Class<?>> result = new ArrayList<Class<?>>(); Class<?> superclass = the_class.getSuperclass(); while (superclass != null) { result.add(superclass); superclass = superclass.getSuperclass(); return result; |