Class SuperTypesLastSorter

java.lang.Object
org.mockito.internal.util.reflection.SuperTypesLastSorter

public class SuperTypesLastSorter extends Object
Sort fields in an order suitable for injection, by name with superclasses moved after their subclasses.
  • Method Details

    • sortSuperTypesLast

      public static List<Field> sortSuperTypesLast(Collection<? extends Field> unsortedFields)
      Return a new collection with the fields sorted first by name, then with any fields moved after their supertypes.