List<TypeAnnotation> (List<TypeAnnotation> typeAnnotations) { return typeAnnotations.stream() .filter(typeAnnotation -> { TargetInfo targetInfo = typeAnnotation.getTargetInfo(); return targetInfo instanceof SupertypeTarget && ((SupertypeTarget)targetInfo).inExtendsClause(); }).collect(Collectors.toList()); }