public void putSnippet(@Nonnull Snippet snippet) {
		String name = snippet.name();
		Snippet old = config.getSnippets().put(name, snippet);
		if (snippet.equals(old)) return;
		if (old == null)
			Unchecked.checkedForEach(listeners, listener -> listener.onSnippetAdded(snippet),
					(listener, t) -> logger.error("Exception thrown when registering snippet '{}'", name, t));
		else
			Unchecked.checkedForEach(listeners, listener -> listener.onSnippetModified(old, snippet),
					(listener, t) -> logger.error("Exception thrown when updating snippet '{}'", name, t));
	}
Register or update a snippet.

@param snippet
		Snippet to register.
		If an existing snippet with the same {@link Snippet#name()} exists, it will be replaced.
recaf-core/src/main/java/software/coley/recaf/services/assembler/SnippetManager.java