public class PluginLoader extends URLClassLoader
Constructor and Description |
---|
PluginLoader(File jf)
Creates a new instance of PluginLodaer
If the system property "net.java.games.util.plugins.nolocalnative" is
not set then the laoder will look for requried native libs in the
same directory as the plugin jar.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attemptPluginDefine(Class pc)
This function is called as part of scanning the Jar for
plugins.
|
protected String |
findLibrary(String libname)
This method is queried by the System.loadLibrary()
code to find the actual native name and path to the
native library to load.
|
addURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, getURLs, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public PluginLoader(File jf) throws MalformedURLException
jf
- The JarFile to load the Plugins from.MalformedURLException
- Will throw this exception if jf does not refer to a
legitimate Jar file.protected String findLibrary(String libname)
findLibrary
in class ClassLoader
libname
- The JNI name of the native library to locate.public boolean attemptPluginDefine(Class pc)
pc
- The potential plug-in class to vette.Copyright © 2016. All rights reserved.