public static Method getDeclaredMethod ( Class < ? > type , String methodName , Class < ? > ... parameterTypes ) { Method method = null ; try { method = type . getDeclaredMethod ( methodName , parameterTypes ) ; if ( method . isBridge ( ) ) { method = MethodProvider . getInstance ( ) . unbride ( method , type ) ; } } catch ( NoSuchMethodException e ) { Class < ? > superclass = type . getSuperclass ( ) ; if ( superclass != null ) { method = getDeclaredMethod ( superclass , methodName , parameterTypes ) ; } } catch ( ClassNotFoundException e ) { Throwables . propagate ( e ) ; } catch ( IOException e ) { Throwables . propagate ( e ) ; } return method ; }
Gets declared method from specified type by mame and parameters types .