@SuppressWarnings({"rawtypes", "unchecked"})
	private void enable(@Nonnull LoadedPlugin loadedPlugin) throws PluginException {
		// Enable dependent plugins
		for (LoadedPlugin dependency : loadedPlugin.getDependencies())
			enable(dependency);

		// Check if the plugin is already initialized.
		PluginContainerImpl container = loadedPlugin.getContainer();
		Plugin plugin = container.plugin;
		if (plugin != null) return; // Already initialized, skip.

		// Initialize and enable the plugin.
		try {
			Class<? extends Plugin> pluginClass = (Class<? extends Plugin>) container.classLoader.lookupClass(container.preparedPlugin.pluginClassName());
			plugin = classAllocator.instance(pluginClass);
			plugin.onEnable();
			container.plugin = plugin;
		} catch (Throwable t) {
			throw new PluginException(t);
		}
	}
Enables the given plugin, initializing if necessary.

@param loadedPlugin
		Plugin to enable.

@throws PluginException
		If the plugin could not be initialized or enabled.
recaf-core/src/main/java/software/coley/recaf/services/plugin/PluginGraph.java