| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final boolean | |
| pack-priv boolean | |
| pack-priv File |
| Access | Constructor and Description |
|---|---|
| public | PluginLoader(File
The JarFile to load the Plugins from. 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 |
|---|---|
| public boolean | Returns: Returns true if the class meets the criteria for a plugin. Otherwise returns false.The potential plug-in class to vette. pc)This function is called as part of scanning the Jar for plugins. |
| private boolean | |
| protected String | Returns: Returns a string describing the actual loation of the native library in the native file system.The JNI name of the native library to locate. libname)Overrides java. |
| DEBUG | back to summary |
|---|---|
| pack-priv static final boolean DEBUG | |
| localDLLs | back to summary |
|---|---|
| pack-priv boolean localDLLs | |
| parentDir | back to summary |
|---|---|
| pack-priv File parentDir | |
| PluginLoader | back to summary |
|---|---|
| public PluginLoader(File jf) throws MalformedURLException 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. (Useful for handling name collision between plugins). If it IS set however, then it will fall back to the default way of loading natives. (Necessary for Java Web Start.)
| |
| attemptPluginDefine | back to summary |
|---|---|
| public boolean attemptPluginDefine(Class<T> pc) This function is called as part of scanning the Jar for plugins. It checks to make sure the class passed in is a legitimate plugin, which is to say that it meets the following criteria: (1) Is not itself an interface (2) Implements the Plugin marker interface either directly or through inheritance. interface, either
| |
| classImplementsPlugin | back to summary |
|---|---|
| private boolean classImplementsPlugin(Class<T> testClass) | |
| findLibrary | back to summary |
|---|---|
| protected String findLibrary(String libname) Overrides java. This method is queried by the System.loadLibrary() code to find the actual native name and path to the native library to load. This subclass implementation of this method ensures that the native library will be loaded from, and only from, the parent directory of the Jar file this loader was created to support. This allows different Plugins with supporting DLLs of the same name to co-exist, each in their own subdirectory. Setting the global "localDLLs" by setting the property net.java.games.util.plugins.nolocalnative defeats this behavior. This is necessary for Java Web Start apps which have strong restrictions on where and how native libs can be loaded. | |