pluginregistry.java

来自「纯java操作系统jnode,安装简单和操作简单的个人使用的Java操作系统」· Java 代码 · 共 71 行

JAVA
71
字号
/*
 * $Id: PluginRegistry.java,v 1.4 2004/01/20 19:30:18 epr Exp $
 */
package org.jnode.plugin;

import java.io.InputStream;
import java.net.URL;
import java.util.Iterator;

/**
 * Registry of all plugins in the system.
 * 
 * @author Ewout Prangsma (epr@users.sourceforge.net)
 */
public interface PluginRegistry {

	/**
	 * Gets the descriptor of the plugin with the given id.
	 * @param pluginId
	 * @return The plugin descriptor found, or null if not found
	 */
	public PluginDescriptor getPluginDescriptor(String pluginId);
	
	/**
	 * Gets the extension point with the given id.
	 * @param id
	 * @return The extension point found, or null if not found
	 */
	public ExtensionPoint getExtensionPoint(String id);
	
	/**
	 * Returns an iterator to iterate over all PluginDescriptor's.
	 * @return Iterator<PluginDescriptor>
	 */
	public Iterator getDescriptorIterator();

	/**
	 * Load a plugin from a given URL.
	 * This will not activate the plugin.
	 * 
	 * @param pluginUrl
	 * @return The descriptor of the loaded plugin.
	 * @throws PluginException
	 */
	public PluginDescriptor loadPlugin(URL pluginUrl) throws PluginException;

	/**
	 * Load a plugin from a given InputStream.
	 * This will not activate the plugin.
	 * 
	 * @param is
	 * @return The descriptor of the loaded plugin.
	 * @throws PluginException
	 */
	public PluginDescriptor loadPlugin(InputStream is) throws PluginException;

	/**
	 * Remove the plugin with the given id from this registry.
	 * 
	 * @param pluginId
	 * @throws PluginException
	 */
	public void unloadPlugin(String pluginId) throws PluginException;
	
	/**
	 * Gets the classloader that loads classes from all loaded plugins.
	 * @return ClassLoader
	 */
	public ClassLoader getPluginsClassLoader();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?