public static Method getStaticMethod ( Class < ? > clazz , String methodName , Class < ? > ... args ) { Assert . notNull ( clazz , "Class must not be null" ) ; Assert . notNull ( methodName , "Method name must not be null" ) ; try { Method method = clazz . getMethod ( methodName , args ) ; return Modifier . isStatic ( method . getModifiers ( ) ) ? method : null ; } catch ( NoSuchMethodException ex ) { return null ; } }
Return a public static method of a class .