List<SmartTypePointer> (TypeConstraint @NotNull [] constraints, @NotNull SmartTypePointerManager typePointerManager) { List<SmartTypePointer> result = new ArrayList<>(); for (TypeConstraint constraint : constraints) { if (constraint instanceof SubtypeConstraint) { PsiType type = constraint.getDefaultType(); result.add(typePointerManager.createSmartTypePointer(type)); } else if (constraint instanceof SupertypeConstraint) { processSuperTypes(constraint.getType(), result, typePointerManager); } } return result; }