File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
core/src/com/google/inject/internal Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change 1515 */
1616package com .google .inject .internal ;
1717
18+ import com .google .common .collect .Comparators ;
1819import com .google .common .collect .Ordering ;
1920import java .lang .reflect .Field ;
2021import java .lang .reflect .Method ;
@@ -46,14 +47,14 @@ public static Field[] getDeclaredFields(Class<?> type) {
4647
4748 public static Method [] getDeclaredMethods (Class <?> type ) {
4849 return Arrays .stream (type .getDeclaredMethods ())
49- .sorted (
50- Comparator .comparing (Method ::getName )
51- .thenComparing (Method ::getReturnType , Comparator .comparing (Class ::getName ))
52- .thenComparing (
53- method -> Arrays .asList (method .getParameterTypes ()),
54- // TODO: use Comparators.lexicographical when it's not @Beta.
55- Ordering .< Class <?>> from ( Comparator . comparing ( Class :: getName ) )
56- . lexicographical ()) )
57- .toArray (Method []::new );
50+ .sorted (
51+ Comparator .comparing (Method ::getName )
52+ .thenComparing (Method ::getReturnType , Comparator .comparing (Class ::getName ))
53+ .thenComparing (
54+ method -> Arrays .asList (method .getParameterTypes ()),
55+ Comparators . lexicographical ( Comparator . comparing ( Class :: getName ))
56+ )
57+ )
58+ .toArray (Method []::new );
5859 }
5960}
You can’t perform that action at this time.
0 commit comments