@Override
	public void onPostApply(@Nonnull Workspace workspace, @Nonnull MappingResults mappingResults) {
		// Must apply to the graph's associated workspace.
		if (this.workspace != workspace)
			return;

		// Remove vertices and lookups of items that no longer exist.
		mappingResults.getPreMappingPaths().forEach((name, path) -> {
			// If we see a 'stub' from the vertex creator, we know it is no longer
			// in the workspace and should be removed from our cache.
			InheritanceVertex vertex = createVertex(name);
			if (vertex == STUB) {
				vertices.remove(name);
				parentToChild.remove(name);
			}
		});

		// While applying mappings, the graph does not perfectly refresh, so we need to clear out some state
		// so that when the graph is used again the correct information will be fetched.
		Set<ClassInfo> visited = Collections.newSetFromMap(new IdentityHashMap<>());
		mappingResults.getPostMappingPaths().forEach((name, path) -> {
			// Stub information for classes we know exist in the workspace should be removed.
			stubs.remove(name);

			// Refresh the parent-->children mapping.
			parentToChild.remove(name);
			ClassInfo postClass = path.getValue();
			populateParentToChildLookup(postClass, visited);
		});
	}
When {@link #STUB} is the return of this method, the class was not found.
<br>
When {@code null} is the return of this method, the class name is illegal.

@param name
		Internal class name.

@return Vertex of class.
recaf-core/src/main/java/software/coley/recaf/services/inheritance/InheritanceGraph.java