Class SuperTypesLastSorter
- java.lang.Object
-
- org.mockito.internal.util.reflection.SuperTypesLastSorter
-
public class SuperTypesLastSorter extends java.lang.Object
Sort fields in an order suitable for injection, by name with superclasses moved after their subclasses.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.Comparator<java.lang.reflect.Field>
compareFieldsByName
-
Constructor Summary
Constructors Modifier Constructor Description private
SuperTypesLastSorter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.lang.reflect.Field>
sortSuperTypesLast(java.util.Collection<? extends java.lang.reflect.Field> unsortedFields)
Return a new collection with the fields sorted first by name, then with any fields moved after their supertypes.
-