public class MethodSorter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<java.lang.reflect.Method> |
DEFAULT
DEFAULT sort order
|
static java.util.Comparator<java.lang.reflect.Method> |
NAME_ASCENDING
Method name ascending lexicographic sort order, with
Method.toString() as a tiebreaker |
Modifier | Constructor and Description |
---|---|
private |
MethodSorter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Method[] |
getDeclaredMethods(java.lang.Class<?> clazz)
Gets declared methods of a class in a predictable order, unless @FixMethodOrder(MethodSorters.JVM) is specified.
|
private static java.util.Comparator<java.lang.reflect.Method> |
getSorter(FixMethodOrder fixMethodOrder) |
public static final java.util.Comparator<java.lang.reflect.Method> DEFAULT
public static final java.util.Comparator<java.lang.reflect.Method> NAME_ASCENDING
Method.toString()
as a tiebreakerpublic static java.lang.reflect.Method[] getDeclaredMethods(java.lang.Class<?> clazz)
clazz
- a classClass.getDeclaredMethods()
but sortedprivate static java.util.Comparator<java.lang.reflect.Method> getSorter(FixMethodOrder fixMethodOrder)