void (final @NotNull List<ImportHelper.Import> names, final @NotNull Collection<String> demandedForNested, @NotNull XmlFile file) { file.accept(new JavaFxUsedClassesVisitor() { @Override protected void appendClassName(String fqn) { names.add(new ImportHelper.Import(fqn, false)); } @Override protected void appendDemandedPackageName(@NotNull String packageName) { demandedForNested.add(packageName); } }); }