Class ClassUtil


  • public class ClassUtil
    extends Object
    Since:
    3.3
    • Constructor Detail

      • ClassUtil

        public ClassUtil()
    • Method Detail

      • getMethod

        public static Method getMethod​(Class aClass,
                                       String aMethodName,
                                       Class[] someParameterTypes)
                                throws NoSuchMethodException
        Parameters:
        aClass - The Class providing method under question (Must not be null)
        aMethodName - The method name to search for (Must not be null)
        someParameterTypes - Method arguments (May be null or parameters)
        Returns:
        A match. If more than one method matched (due to overloading) an arbitrary match is taken
        Throws:
        NoSuchMethodException - If a match cannot be found
      • getDeclaredMethod

        public static Method getDeclaredMethod​(Class aClass,
                                               String aMethodName,
                                               Class[] someParameterTypes)
                                        throws NoSuchMethodException
        Parameters:
        aClass - The Class providing method under question (Must not be null)
        aMethodName - The method name to search for (Must not be null)
        someParameterTypes - Method arguments (May be null or parameters)
        Returns:
        A match. If more than one method matched (due to overloading) an arbitrary match is taken
        Throws:
        NoSuchMethodException - If a match cannot be found