private void appendImports(@Nonnull Printer out) {
		String lastRootPackage = null;
		NavigableSet<String> referencedClasses = new TreeSet<>(classInfo.getReferencedClasses());
		boolean hasImports = false;
		for (String referencedClass : referencedClasses) {
			// Skip classes in the default package.
			if (!referencedClass.contains("/")) continue;

			// Skip core classes that are implicitly imported.
			if (referencedClass.startsWith("java/lang/")) continue;

			// Skip self.
			if (referencedClass.equals(classInfo.getName())) continue;

			// Break root package imports up for clarity. For example:
			//  - com.*
			//  - org.*
			// Between these two import groups will be a blank line.
			String rootPackage = referencedClass.substring(0, referencedClass.indexOf('/'));
			if (lastRootPackage == null) lastRootPackage = rootPackage;
			if (!rootPackage.equals(lastRootPackage)) {
				out.newLine();
				lastRootPackage = rootPackage;
			}

			// Add import
			out.appendLine("import " + format.filterEscape(referencedClass.replace('/', '.')) + ";");
			hasImports = true;

			// TODO: Import names aren't always correct since '$' should also be escaped when it represents the separation of
			//     an outer and inner class. Since we have workspace and runtime access we 'should' check this
			//     and attempt to make more accurate output
		}
		if (hasImports) out.newLine();
	}
Appends each imported class to the output.

@param out
		Printer to write to.
recaf-core/src/main/java/software/coley/recaf/services/decompile/fallback/print/ClassPrinter.java