@Nonnull
	@Override
	public GeneratedPhantomWorkspaceResource createPhantomsForClasses(@Nonnull Workspace workspace, @Nonnull Collection<JvmClassInfo> classes)
			throws PhantomGenerationException {
		// Convert collection to map
		Map<String, JvmClassInfo> classMap = classes.stream()
				.collect(Collectors.toMap(Info::getName, Function.identity(), (a, b) -> a));

		// Generate phantoms for them and wrap into resource
		try {
			Map<String, byte[]> generated = generate(workspace, classMap);
			return wrap(generated);
		} catch (IOException ex) {
			throw new PhantomGenerationException(ex, "JPhantom encountered a problem");
		}
	}
An implementation of {@link PhantomGenerator} using {@link JPhantom}.

@author Matt Coley
recaf-core/src/main/java/software/coley/recaf/services/phantom/JPhantomGenerator.java