Class TypeByUsageComparator

  • All Implemented Interfaces:
    Comparator<Type>

    public final class TypeByUsageComparator
    extends Object
    implements Comparator<Type>
    A Type comparator based on the 'is-used' relationship.
    1. Given two types T1 and T2, T1 will be considered 'less-than' T2 if T1 is used by T2 transitively.
    2. Type T1 is considered to be 'used' by type T2 if any field of T2 is of type T1 or T1 is used by any T2 field type TF.