void (@NotNull JavaCodeFragment fragment) { fragment.addImportsFromString(myClassQName); for (Type type : mySubstitutor.values()) { if (type != null) { type.addImportsTo(fragment); } } for (PsiAnnotation annotation : myProvider.getAnnotations()) { fragment.addImportsFromString(annotation.getQualifiedName()); } }