public static <T> int lastIndexOf(List<? extends T> elems, Filter<T> filter) {
		for (int i=elems.size()-1; i>=0; i--) {
			if ( filter.select(elems.get(i)) ) return i;
		}
		return -1;
	}
Find exact object type or subclass of cl in list
tool/src/org/antlr/v4/misc/Utils.java