@SuppressWarnings("unchecked")
	public void apply() {
		// Track changes in aggregate manager, if given.
		if (aggregateMappingManager != null)
			aggregateMappingManager.updateAggregateMappings(mappings);

		// Pass to handler to notify of application of mappings has started.
		if (applicationHandler != null)
			try {
				applicationHandler.onPreApply(workspace, this);
			} catch (Throwable t) {
				logger.error("Mapping application handler failed on pre-application", t);
			}

		// Record mapping application jobs into a sorted set.
		// We want to apply some changes before others.
		SortedSet<ApplicationEntry> applicationEntries = new TreeSet<>();
		for (Map.Entry<String, String> entry : mappedClasses.entrySet()) {
			String preMappedName = entry.getKey();
			String postMappedName = entry.getValue();
			ClassPathNode preMappedPath = preMappingPaths.get(preMappedName);
			ClassPathNode postMappedPath = postMappingPaths.get(postMappedName);
			if (preMappedPath != null && postMappedPath != null) {
				applicationEntries.add(new ApplicationEntry(preMappedPath, postMappedPath, () -> {
					ClassBundle<ClassInfo> bundle = (ClassBundle<ClassInfo>) postMappedPath.getValueOfType(Bundle.class);
					if (bundle == null)
						throw new IllegalStateException("Cannot apply mapping for '" + preMappedName + "', path missing bundle");

					// Put mapped class into bundle
					ClassInfo postMappedClass = postMappedPath.getValue();
					bundle.put(postMappedClass);

					// Remove old classes if they have been renamed and do not occur
					// in a set of newly applied names
					if (!preMappedName.equals(postMappedName))
						bundle.remove(preMappedName);
				}));
			}
		}

		// Apply changes in sorted order.
		for (ApplicationEntry entry : applicationEntries)
			entry.applicationRunnable().run();

		// Log in console how many classes got mapped.
		logger.info("Applied mapping to {} classes", preMappingPaths.size());

		// Pass to handler again to notify of application of mappings has completed/
		if (applicationHandler != null)
			try {
				applicationHandler.onPostApply(workspace, this);
			} catch (Throwable t) {
				logger.error("Mapping application handler failed on post-application", t);
			}
	}
Applies the mappings to the {@link Workspace} / {@link WorkspaceResource} from {@link MappingApplier}.
recaf-core/src/main/java/software/coley/recaf/services/mapping/MappingResults.java