@ SuppressWarnings ( "unchecked" ) public Method [ ] findAdaptMethodsTo ( Class to ) { Method [ ] methods = mAdaptMethods ; List < Method > candidates = new ArrayList < Method > ( methods . length ) ; for ( int i = methods . length ; -- i >= 0 ; ) { Method method = methods [ i ] ; if ( to . isAssignableFrom ( method . getReturnType ( ) ) ) { candidates . add ( method ) ; } } reduceCandidates ( candidates , to ) ; return ( Method [ ] ) candidates . toArray ( new Method [ candidates . size ( ) ] ) ; }
Returns all the adapt methods that convert to the given type .