class Foo { public WeighingComparable method(boolean b, final Computable elementComputable, Object processingContext) { return new WeighingComparable(elementComputable, new ProximityLocation(), new Weigher[0]); } public static final Key WEIGHER_KEY = null; } abstract class ProximityWeigher extends Weigher { } class ProximityLocation { } class Key

{ } class Weigher { } class Computable {} class WeighingComparable implements Comparable> { public WeighingComparable(final Computable element, final Loc location, final Weigher[] weighers) { } public int compareTo(@NotNull final WeighingComparable comparable) { return 0; } @Nullable private Comparable getWeight(final int index) { return null; } }