Class ReflectUtils


  • public final class ReflectUtils
    extends Object
    Utilities for reflection.
    Since:
    0.6.0
    Version:
    $Id: ReflectUtils.java 16154 2012-07-14 16:34:05Z colin $
    Author:
    tlerios@marketcetera.com
    • Constructor Detail

      • ReflectUtils

        private ReflectUtils()
        Constructor. It is private so that no instances can be created.
    • Method Detail

      • getAllClasses

        private static void getAllClasses​(Set<Class<?>> result,
                                          Class<?> c)
        Auguments the given set with all superclasses and interfaces of the given class, incl. the class itself.
        Parameters:
        result - The set.
        c - The class.
      • getAllClasses

        public static Class<?>[] getAllClasses​(Class<?> c)
        Returns all superclasses and interfaces of the given class, incl. the class itself.
        Parameters:
        c - The class.
        Returns:
        The classes and interfaces.
      • getAllFields

        public static Field[] getAllFields​(Class<?> c)
        Returns all fields of the given class, incl. those in the class itself, its superclasses and interfaces.
        Parameters:
        c - The class.
        Returns:
        The fields.