public static < T > Method [ ] getAllMethodsExcept ( Class < T > type , String methodNameToExclude , Class < ? > [ ] argumentTypes ) { Method [ ] methods = getAllMethods ( type ) ; List < Method > methodList = new ArrayList < Method > ( ) ; outer : for ( Method method : methods ) { if ( method . getName ( ) . equals ( methodNameToExclude ) ) { if ( argumentTypes != null && argumentTypes . length > 0 ) { final Class < ? > [ ] args = method . getParameterTypes ( ) ; if ( args != null && args . length == argumentTypes . length ) { for ( int i = 0 ; i < args . length ; i ++ ) { if ( args [ i ] . isAssignableFrom ( getOriginalUnmockedType ( argumentTypes [ i ] ) ) ) { /* * Method was not found thus it should not be * mocked. Continue to investigate the next * method. */ continue outer ; } } } } else { continue ; } } methodList . add ( method ) ; } return methodList . toArray ( new Method [ 0 ] ) ; }
Gets the all metods except .