public class PluginPackage
extends java.lang.Object
构造器和说明 |
---|
PluginPackage(java.io.File file,
PluginClassLoader classLoader,
java.util.List<PluginEntity> plugins) |
限定符和类型 | 方法和说明 |
---|---|
PluginClassLoader |
getClassLoader() |
java.io.File |
getFile() |
java.net.URL |
getResource(java.lang.String name) |
java.lang.String |
getResourceAsString(java.lang.String name) |
java.lang.String |
getResourceAsString(java.lang.String name,
java.lang.String charset) |
boolean |
getStarted() |
java.lang.Class<?> |
loadClass(java.lang.String className) |
static PluginPackage |
loadJar(java.io.File file)
加载 jar 插件包
|
void |
prestop()
预停止插件包
|
PluginPackage |
start()
启动插件包
|
void |
stop()
停止插件包
|
<T> T |
tryInstance(java.lang.String className) |
static void |
unloadJar(PluginPackage pluginPackage)
卸载 Jar 插件包
|
public PluginPackage(java.io.File file, PluginClassLoader classLoader, java.util.List<PluginEntity> plugins)
public java.io.File getFile()
public PluginClassLoader getClassLoader()
public boolean getStarted()
public java.lang.Class<?> loadClass(java.lang.String className)
public <T> T tryInstance(java.lang.String className)
public java.net.URL getResource(java.lang.String name)
public java.lang.String getResourceAsString(java.lang.String name) throws java.io.IOException
java.io.IOException
public java.lang.String getResourceAsString(java.lang.String name, java.lang.String charset) throws java.io.IOException
java.io.IOException
public PluginPackage start()
public void prestop()
public void stop()
public static PluginPackage loadJar(java.io.File file)
file
- 文件public static void unloadJar(PluginPackage pluginPackage)
pluginPackage
- 插件包