private void insert(@Nonnull TransformerQueue queue, @Nonnull Class<? extends ClassTransformer> transformerClass,
	                    @Nonnull Set<Class<? extends ClassTransformer>> dependants) throws TransformationException {
		// Abort if a cycle is detected
		if (dependants.contains(transformerClass))
			throw new TransformationException("Transformer dependency cycle detected with '" + transformerClass.getSimpleName() + "'");

		// Create the transformer and its dependencies
		//  - Dependencies first
		//  - Then the transformer
		ClassTransformer transformer;
		if (JvmClassTransformer.class.isAssignableFrom(transformerClass)) {
			Class<? extends JvmClassTransformer> jvmTransformerClass = cast(transformerClass);
			transformer = transformationManager.newJvmTransformer(jvmTransformerClass);
		} else {
			throw new TransformationException("Unsupported transformer class type: " + transformerClass);
		}
		for (Class<? extends ClassTransformer> dependency : transformer.dependencies())
			if (!queue.containsType(dependency))
				insert(queue, dependency, Sets.add(dependants, transformerClass));
		queue.add(transformer);
	}
@param transformerClasses
		JVM class transformers to run.
@param predicate
		Filter to control which JVM classes are transformed.
		Can be {@code null} to transform all JVM classes.

@return Result container with details about the transformation, including any failures, the transformed classes,
and the option to apply the transformations to the workspace.

@throws TransformationException
		When transformation cannot be run for any reason.
recaf-core/src/main/java/software/coley/recaf/services/transform/TransformationApplier.java