It'd be nice to write this bit flatter. Would this work:

    boolean isBestCandidate = (bestCandidate == null && c.isAssignableFrom(targetClass)) || bestCandidate.isAssignableFrom(c);
    if (isBestCandidate) {
        bestCandidate = c;
    }