-
- All Implemented Interfaces:
-
java.util.Comparator
public class TypeSpecificityComparator implements Comparator<TypeMirror>
A comparator that compares the "specificity" of a TypeMirror. Essentially a more specific type can be cast to a less specific type, but not the other way around. If neither type can be cast to the other or both types can be cast to each other they have equal specificity.
Precisely,
ais more specific thanbwhenb.isAssignableFrom(a) && !a.isAssignableFrom(b).
-
-
Field Summary
Fields Modifier and Type Field Description public final static TypeSpecificityComparatorINSTANCE
-
Method Summary
Modifier and Type Method Description Integercompare(TypeMirror o1, TypeMirror o2)-
Methods inherited from class dev.thecodewarrior.mirror.type.TypeSpecificityComparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
compare
Integer compare(TypeMirror o1, TypeMirror o2)
-
-
-
-