./0000755000175000017500000000000011367345257011166 5ustar twernertwerner./bak/0000755000175000017500000000000011367345253011717 5ustar twernertwerner./bak/net/0000755000175000017500000000000011367345253012505 5ustar twernertwerner./bak/net/java/0000755000175000017500000000000011367345253013426 5ustar twernertwerner./bak/net/java/games/0000755000175000017500000000000011367345253014522 5ustar twernertwerner./bak/net/java/games/util/0000755000175000017500000000000011367345253015477 5ustar twernertwerner./bak/net/java/games/util/plugins/0000755000175000017500000000000011367345254017161 5ustar twernertwerner./bak/net/java/games/util/plugins/PluginLoader.java~1~0000644000175000017500000001424107736353636023100 0ustar twernertwerner/* * PluginLodaer.java * * Created on April 18, 2003, 11:32 AM */ /***************************************************************************** * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistribution in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materails provided with the distribution. * * Neither the name Sun Microsystems, Inc. or the names of the contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed or intended for us in * the design, construction, operation or maintenance of any nuclear facility * *****************************************************************************/ package net.java.games.util.plugins; /** * * @author jeff */ import java.io.*; import java.net.*; /** This class is used internally by the Plugin system. * End users of the system are unlikely to need to be aware * of it. * * * This is the class loader used to keep the namespaces of * different plugins isolated from each other and from the * main app code. One plugin loader is created per Jar * file in the sub-directory tree of the plugin directory. * * In addition to isolating java classes this loader also isolates * DLLs such that plugins with conflicting DLL names may be * used by simply placing the plugin and its associated DLL * in a sub-folder of its own. * * This class also currently implements methods for testing * classes for inheritance of superclasses or interfaces. * This code is genericly useful and should really be moved * to a seperate ClassUtils class. * @author Jeffrey Kesselman */ public class PluginLoader extends URLClassLoader { static final boolean DEBUG = false; File parentDir; boolean localDLLs = true; /** Creates a new instance of PluginLodaer * @param jf The JarFile to load the Plugins from. * @throws MalformedURLException Will throw this exception if jf does not refer to a * legitimate Jar file. */ public PluginLoader(File jf) throws MalformedURLException { super(new URL[] {jf.toURL()}); parentDir = jf.getParentFile(); if (System.getProperty("net.java.games.util.plugins.nolocalnative") !=null){ localDLLs = false; } } /** 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. * @param libname The JNI name of the native library to locate. * @return Returns a string describing the actual loation of the * native library in the native file system. */ protected String findLibrary(String libname){ if (localDLLs) { String libpath = parentDir.getPath() + File.separator + System.mapLibraryName(libname); if (DEBUG) { System.out.println("Returning libname of: " + libpath); } return libpath; } else { return super.findLibrary(libname); } } /** 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 * @param pc The potential plug-in class to vette. * @return Returns true if the class meets the criteria for a * plugin. Otherwise returns false. */ public boolean attemptPluginDefine(Class pc){ return ((!pc.isInterface()) && classImplementsPlugin(pc)); } private boolean classImplementsPlugin(Class testClass){ if (testClass == null) return false; // end of tree if (DEBUG) { System.out.println("testing class "+testClass.getName()); } Class[] implementedInterfaces = testClass.getInterfaces(); for(int i=0;iany of the passed in set of * Interfaces (either directly or through inheritance.) * @param interfaces A set of interfaces to match against the interfaces * implemented by the plugin classes. * @return The list of plugin classes that implement at least * one member of the passed in set of interfaces. */ public Class[] getImplementsAny(Class[] interfaces){ List matchList = new ArrayList(pluginList.size()); Set interfaceSet = new HashSet(); for(int i=0;iall of the passed in set of * Interfaces (either directly or through inheritance.) * @param interfaces A set of interfaces to match against the interfaces * implemented by the plugin classes. * @return The list of plugin classes that implement at least * one member of the passed in set of interfaces. */ public Class[] getImplementsAll(Class[] interfaces){ List matchList = new ArrayList(pluginList.size()); Set interfaceSet = new HashSet(); for(int i=0;i ./apidocs/0000755000175000017500000000000011367345245012605 5ustar twernertwerner./apidocs/deprecated-list.html0000644000175000017500000001036607736654440016557 0ustar twernertwerner Deprecated List

Deprecated API



./apidocs/allclasses-noframe.html0000644000175000017500000000266607736654440017265 0ustar twernertwerner All Classes All Classes
FooChildPlugin
FooPlugin
InheritedInterfacePlugin
InterfaceNotAPlugin
NotAPlugin
Plugin
PluginLoader
Plugins
PluginTest
./apidocs/packages.html0000644000175000017500000000120607736354276015261 0ustar twernertwerner


The front page has been relocated.Please see:
          Frame version
          Non-frame version.
./apidocs/index.html0000644000175000017500000000137007736654440014610 0ustar twernertwerner Generated Documentation (Untitled) <H2> Frame Alert</H2> <P> This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. <BR> Link to<A HREF="overview-summary.html">Non-frame version.</A> ./apidocs/overview-tree.html0000644000175000017500000001441407736354276016313 0ustar twernertwerner Class Hierarchy

Hierarchy For All Packages

Package Hierarchies:
net.java.games.util.plugins, net.java.games.util.plugins.test

Class Hierarchy

  • class java.lang.Object
    • class java.lang.ClassLoader
      • class java.security.SecureClassLoader
        • class java.net.URLClassLoader
    • class net.java.games.util.plugins.test.FooPlugin (implements net.java.games.util.plugins.Plugin)
    • class net.java.games.util.plugins.test.InheritedInterfacePlugin (implements net.java.games.util.plugins.test.InterfaceNotAPlugin)
    • class net.java.games.util.plugins.test.NotAPlugin
    • class net.java.games.util.plugins.Plugins
    • class net.java.games.util.plugins.test.PluginTest

Interface Hierarchy



./apidocs/constant-values.html0000644000175000017500000001054707736654440016635 0ustar twernertwerner Constant Field Values

Constant Field Values


Contents


./apidocs/package-list0000644000175000017500000000007507736353603015100 0ustar twernertwernernet.java.games.util.plugins net.java.games.util.plugins.test ./apidocs/allclasses-frame.html0000644000175000017500000000302007736654440016711 0ustar twernertwerner All Classes All Classes
FooChildPlugin
FooPlugin
InheritedInterfacePlugin
InterfaceNotAPlugin
NotAPlugin
Plugin
PluginLoader
Plugins
PluginTest
./apidocs/overview-frame.html0000644000175000017500000000221707736354276016444 0ustar twernertwerner Overview
All Classes

Packages
net.java.games.util.plugins
net.java.games.util.plugins.test

  ./apidocs/stylesheet.css0000644000175000017500000000242307736353614015515 0ustar twernertwerner/* Javadoc style sheet */ /* Define colors, fonts and other style attributes here to override the defaults */ /* Page background color */ body { background-color: #FFFFFF } /* Table colors */ .TableHeadingColor { background: #CCCCFF } /* Dark mauve */ .TableSubHeadingColor { background: #EEEEFF } /* Light mauve */ .TableRowColor { background: #FFFFFF } /* White */ /* Font used in left-hand frame lists */ .FrameTitleFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } .FrameHeadingFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } .FrameItemFont { font-size: 10pts; font-family: Helvetica, Arial, san-serif } /* Example of smaller, sans-serif font in frames */ /* .FrameItemFont { font-size: 10pt; font-family: Helvetica, Arial, sans-serif } */ /* Navigation bar fonts and colors */ .NavBarCell1 { background-color:#EEEEFF;}/* Light mauve */ .NavBarCell1Rev { background-color:#00008B;}/* Dark Blue */ .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} ./apidocs/net/0000755000175000017500000000000011367345245013373 5ustar twernertwerner./apidocs/net/java/0000755000175000017500000000000011367345245014314 5ustar twernertwerner./apidocs/net/java/games/0000755000175000017500000000000011367345245015410 5ustar twernertwerner./apidocs/net/java/games/util/0000755000175000017500000000000011367345245016365 5ustar twernertwerner./apidocs/net/java/games/util/plugins/0000755000175000017500000000000011367345250020042 5ustar twernertwerner./apidocs/net/java/games/util/plugins/PluginLoader.html0000644000175000017500000003422307736354271023331 0ustar twernertwerner PluginLoader


net.java.games.util.plugins
Class PluginLoader

java.lang.Object
  |
  +--java.lang.ClassLoader
        |
        +--java.security.SecureClassLoader
              |
              +--java.net.URLClassLoader
                    |
                    +--net.java.games.util.plugins.PluginLoader

public class PluginLoader
extends java.net.URLClassLoader

This class is used internally by the Plugin system. End users of the system are unlikely to need to be aware of it. This is the class loader used to keep the namespaces of different plugins isolated from each other and from the main app code. One plugin loader is created per Jar file in the sub-directory tree of the plugin directory. In addition to isolating java classes this loader also isolates DLLs such that plugins with conflicting DLL names may be used by simply placing the plugin and its associated DLL in a sub-folder of its own. This class also currently implements methods for testing classes for inheritance of superclasses or interfaces. This code is genericly useful and should really be moved to a seperate ClassUtils class.

Author:
Jeffrey Kesselman

Constructor Summary
PluginLoader(java.io.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.
 
Method Summary
 boolean attemptPluginDefine(java.lang.Class pc)
          This function is called as part of scanning the Jar for plugins.
protected  java.lang.String findLibrary(java.lang.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.
 
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
 
Methods inherited from class java.security.SecureClassLoader
defineClass
 
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginLoader

public PluginLoader(java.io.File jf)
             throws java.net.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.)

Parameters:
jf - The JarFile to load the Plugins from.
Throws:
java.net.MalformedURLException - Will throw this exception if jf does not refer to a legitimate Jar file.
Method Detail

findLibrary

protected java.lang.String findLibrary(java.lang.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. 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.

Overrides:
findLibrary in class java.lang.ClassLoader
Parameters:
libname - The JNI name of the native library to locate.
Returns:
Returns a string describing the actual loation of the native library in the native file system.

attemptPluginDefine

public boolean attemptPluginDefine(java.lang.Class 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

Parameters:
pc - The potential plug-in class to vette.
Returns:
Returns true if the class meets the criteria for a plugin. Otherwise returns false.


./apidocs/net/java/games/util/plugins/test/0000755000175000017500000000000011367345253021024 5ustar twernertwerner./apidocs/net/java/games/util/plugins/test/PluginTest.html0000644000175000017500000002143007736354274024020 0ustar twernertwerner PluginTest

net.java.games.util.plugins.test
Class PluginTest

java.lang.Object
  |
  +--net.java.games.util.plugins.test.PluginTest

public class PluginTest
extends java.lang.Object


Constructor Summary
PluginTest()
          Creates a new instance of PluginTest
 
Method Summary
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PluginTest

public PluginTest()
Creates a new instance of PluginTest

Method Detail

main

public static void main(java.lang.String[] args)
Parameters:
args - the command line arguments


./apidocs/net/java/games/util/plugins/test/package-frame.html0000644000175000017500000000302507736354274024405 0ustar twernertwerner net.java.games.util.plugins.test net.java.games.util.plugins.test
Interfaces 
InterfaceNotAPlugin
Classes 
FooChildPlugin
FooPlugin
InheritedInterfacePlugin
NotAPlugin
PluginTest
./apidocs/net/java/games/util/plugins/test/FooChildPlugin.html0000644000175000017500000002025107736354274024570 0ustar twernertwerner FooChildPlugin

net.java.games.util.plugins.test
Class FooChildPlugin

java.lang.Object
  |
  +--net.java.games.util.plugins.test.FooPlugin
        |
        +--net.java.games.util.plugins.test.FooChildPlugin
All Implemented Interfaces:
Plugin

public class FooChildPlugin
extends FooPlugin

Author:
jeff

Constructor Summary
FooChildPlugin()
          Creates a new instance of FooChildPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FooChildPlugin

public FooChildPlugin()
Creates a new instance of FooChildPlugin



./apidocs/net/java/games/util/plugins/test/InterfaceNotAPlugin.html0000644000175000017500000001456607736354274025577 0ustar twernertwerner InterfaceNotAPlugin

net.java.games.util.plugins.test
Interface InterfaceNotAPlugin

All Superinterfaces:
Plugin
All Known Implementing Classes:
InheritedInterfacePlugin

public interface InterfaceNotAPlugin
extends Plugin

Author:
jeff



./apidocs/net/java/games/util/plugins/test/InheritedInterfacePlugin.html0000644000175000017500000002102507736354274026635 0ustar twernertwerner InheritedInterfacePlugin

net.java.games.util.plugins.test
Class InheritedInterfacePlugin

java.lang.Object
  |
  +--net.java.games.util.plugins.test.InheritedInterfacePlugin
All Implemented Interfaces:
InterfaceNotAPlugin, Plugin

public class InheritedInterfacePlugin
extends java.lang.Object
implements InterfaceNotAPlugin

Author:
jeff

Constructor Summary
InheritedInterfacePlugin()
          Creates a new instance of InheritedInterfacePlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InheritedInterfacePlugin

public InheritedInterfacePlugin()
Creates a new instance of InheritedInterfacePlugin



./apidocs/net/java/games/util/plugins/test/NotAPlugin.html0000644000175000017500000001772007736354274023751 0ustar twernertwerner NotAPlugin

net.java.games.util.plugins.test
Class NotAPlugin

java.lang.Object
  |
  +--net.java.games.util.plugins.test.NotAPlugin

public class NotAPlugin
extends java.lang.Object

Author:
jeff

Constructor Summary
NotAPlugin()
          Creates a new instance of NotAPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotAPlugin

public NotAPlugin()
Creates a new instance of NotAPlugin



./apidocs/net/java/games/util/plugins/test/package-summary.html0000644000175000017500000001422007736354274025007 0ustar twernertwerner net.java.games.util.plugins.test

Package net.java.games.util.plugins.test

Interface Summary
InterfaceNotAPlugin  
 

Class Summary
FooChildPlugin  
FooPlugin  
InheritedInterfacePlugin  
NotAPlugin  
PluginTest  
 



./apidocs/net/java/games/util/plugins/test/FooPlugin.html0000644000175000017500000002051207736354274023624 0ustar twernertwerner FooPlugin

net.java.games.util.plugins.test
Class FooPlugin

java.lang.Object
  |
  +--net.java.games.util.plugins.test.FooPlugin
All Implemented Interfaces:
Plugin
Direct Known Subclasses:
FooChildPlugin

public class FooPlugin
extends java.lang.Object
implements Plugin

Author:
jeff

Constructor Summary
FooPlugin()
          Creates a new instance of FooPlugin
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FooPlugin

public FooPlugin()
Creates a new instance of FooPlugin



./apidocs/net/java/games/util/plugins/test/package-tree.html0000644000175000017500000001475407736354274024265 0ustar twernertwerner net.java.games.util.plugins.test Class Hierarchy

Hierarchy For Package net.java.games.util.plugins.test

Package Hierarchies:
All Packages

Class Hierarchy

Interface Hierarchy



./apidocs/net/java/games/util/plugins/package-frame.html0000644000175000017500000000236207736354271023426 0ustar twernertwerner net.java.games.util.plugins net.java.games.util.plugins
Interfaces 
Plugin
Classes 
PluginLoader
Plugins
./apidocs/net/java/games/util/plugins/Plugins.html0000644000175000017500000003224407736354271022366 0ustar twernertwerner Plugins

net.java.games.util.plugins
Class Plugins

java.lang.Object
  |
  +--net.java.games.util.plugins.Plugins

public class Plugins
extends java.lang.Object

This is the application interface to the Plugin system. One Plugins object should be created for each plug-in directory tree root. On creation the Plugins object will scan its assigned directory tree and examine all Jar files in that tree to see if they qualify as Plug-ins. The Plugin classes may then be retrived from the Plugins object by calling the appropriate get function (see below). If a plugin requires a native code library, that library must be present in the same directory as the plugin Jar file UNLESS the property "net.java.games.util.plugins.nolocalnative" is set. In that case it will fall abck to the VM or environment's default way of finding native libraries. (This is n ecessary for Java Web Start apps.)


Constructor Summary
Plugins(java.io.File pluginRoot)
          Creates a new instance of Plugins
 
Method Summary
 java.lang.Class[] get()
          This method returns all the Plugins found in the directory passed in at object creation time or any of its sub-directories.
 java.lang.Class[] getExtends(java.lang.Class superclass)
          This method returns a sub-list of all the found Plugin classes that extend the passed in Class (either directly or through inheritance.)
 java.lang.Class[] getImplementsAll(java.lang.Class[] interfaces)
          This method returns a sub-list of all the found Plugin classes that implement all of the passed in set of Interfaces (either directly or through inheritance.)
 java.lang.Class[] getImplementsAny(java.lang.Class[] interfaces)
          This method returns a sub-list of all the found Plugin classes that implement any of the passed in set of Interfaces (either directly or through inheritance.)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Plugins

public Plugins(java.io.File pluginRoot)
        throws java.io.IOException
Creates a new instance of Plugins

Parameters:
pluginRoot - The root od the directory tree to scan for Jars containing plugins.
Method Detail

get

public java.lang.Class[] get()
This method returns all the Plugins found in the directory passed in at object creation time or any of its sub-directories.

Returns:
An array of Plugin objects

getImplementsAny

public java.lang.Class[] getImplementsAny(java.lang.Class[] interfaces)
This method returns a sub-list of all the found Plugin classes that implement any of the passed in set of Interfaces (either directly or through inheritance.)

Parameters:
interfaces - A set of interfaces to match against the interfaces implemented by the plugin classes.
Returns:
The list of plugin classes that implement at least one member of the passed in set of interfaces.

getImplementsAll

public java.lang.Class[] getImplementsAll(java.lang.Class[] interfaces)
This method returns a sub-list of all the found Plugin classes that implement all of the passed in set of Interfaces (either directly or through inheritance.)

Parameters:
interfaces - A set of interfaces to match against the interfaces implemented by the plugin classes.
Returns:
The list of plugin classes that implement at least one member of the passed in set of interfaces.

getExtends

public java.lang.Class[] getExtends(java.lang.Class superclass)
This method returns a sub-list of all the found Plugin classes that extend the passed in Class (either directly or through inheritance.)

Parameters:
superclass - The class to match.
Returns:
The list of plugin classes that extend the passed in class.


./apidocs/net/java/games/util/plugins/Plugin.html0000644000175000017500000001543407736354271022205 0ustar twernertwerner Plugin

net.java.games.util.plugins
Interface Plugin

All Known Subinterfaces:
InterfaceNotAPlugin
All Known Implementing Classes:
FooPlugin, InheritedInterfacePlugin

public interface Plugin

This is a marker interface used to mark plugins in a Jar file for retrieval by the Plugins class. In order for a class to be treated as a Plugin the following must be true: (1) The name of the class must end with "Plugin". (ie MedianCutFilterPlugin, DirectInput EnvrionmentPlugin) (2) The class must implement the Plugin interface. It can do so directly, through inheritence of either a superclass that implements this interface, or through the implementation of an interface that extends this interface.

Author:
Jeffrey P. Kesselman



./apidocs/net/java/games/util/plugins/package-summary.html0000644000175000017500000001347507736354271024040 0ustar twernertwerner net.java.games.util.plugins

Package net.java.games.util.plugins

Interface Summary
Plugin This is a marker interface used to mark plugins in a Jar file for retrieval by the Plugins class.
 

Class Summary
PluginLoader This class is used internally by the Plugin system.
Plugins This is the application interface to the Plugin system.
 



./apidocs/net/java/games/util/plugins/package-tree.html0000644000175000017500000001316607736354271023277 0ustar twernertwerner net.java.games.util.plugins Class Hierarchy

Hierarchy For Package net.java.games.util.plugins

Package Hierarchies:
All Packages

Class Hierarchy

  • class java.lang.Object
    • class java.lang.ClassLoader
      • class java.security.SecureClassLoader
        • class java.net.URLClassLoader
    • class net.java.games.util.plugins.Plugins

Interface Hierarchy

  • interface net.java.games.util.plugins.Plugin


./apidocs/overview-summary.html0000644000175000017500000001144007736354276017045 0ustar twernertwerner Overview

Packages
net.java.games.util.plugins  
net.java.games.util.plugins.test  

 



./apidocs/index-all.html0000644000175000017500000002744107736654440015365 0ustar twernertwerner Index
A F G I M N P

A

attemptPluginDefine(Class) - Method in class net.java.games.util.plugins.PluginLoader
This function is called as part of scanning the Jar for plugins.

F

findLibrary(String) - Method in class net.java.games.util.plugins.PluginLoader
This method is queried by the System.loadLibrary() code to find the actual native name and path to the native library to load.
FooChildPlugin - class net.java.games.util.plugins.test.FooChildPlugin.
 
FooChildPlugin() - Constructor for class net.java.games.util.plugins.test.FooChildPlugin
Creates a new instance of FooChildPlugin
FooPlugin - class net.java.games.util.plugins.test.FooPlugin.
 
FooPlugin() - Constructor for class net.java.games.util.plugins.test.FooPlugin
Creates a new instance of FooPlugin

G

get() - Method in class net.java.games.util.plugins.Plugins
This method returns all the Plugins found in the directory passed in at object creation time or any of its sub-directories.
getExtends(Class) - Method in class net.java.games.util.plugins.Plugins
This method returns a sub-list of all the found Plugin classes that extend the passed in Class (either directly or through inheritance.)
getImplementsAll(Class[]) - Method in class net.java.games.util.plugins.Plugins
This method returns a sub-list of all the found Plugin classes that implement all of the passed in set of Interfaces (either directly or through inheritance.)
getImplementsAny(Class[]) - Method in class net.java.games.util.plugins.Plugins
This method returns a sub-list of all the found Plugin classes that implement any of the passed in set of Interfaces (either directly or through inheritance.)

I

InheritedInterfacePlugin - class net.java.games.util.plugins.test.InheritedInterfacePlugin.
 
InheritedInterfacePlugin() - Constructor for class net.java.games.util.plugins.test.InheritedInterfacePlugin
Creates a new instance of InheritedInterfacePlugin
InterfaceNotAPlugin - interface net.java.games.util.plugins.test.InterfaceNotAPlugin.
 

M

main(String[]) - Static method in class net.java.games.util.plugins.test.PluginTest
 

N

net.java.games.util.plugins - package net.java.games.util.plugins
 
net.java.games.util.plugins.test - package net.java.games.util.plugins.test
 
NotAPlugin - class net.java.games.util.plugins.test.NotAPlugin.
 
NotAPlugin() - Constructor for class net.java.games.util.plugins.test.NotAPlugin
Creates a new instance of NotAPlugin

P

Plugin - interface net.java.games.util.plugins.Plugin.
This is a marker interface used to mark plugins in a Jar file for retrieval by the Plugins class.
PluginLoader - class net.java.games.util.plugins.PluginLoader.
This class is used internally by the Plugin system.
PluginLoader(File) - Constructor for class net.java.games.util.plugins.PluginLoader
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.
Plugins - class net.java.games.util.plugins.Plugins.
This is the application interface to the Plugin system.
Plugins(File) - Constructor for class net.java.games.util.plugins.Plugins
Creates a new instance of Plugins
PluginTest - class net.java.games.util.plugins.test.PluginTest.
 
PluginTest() - Constructor for class net.java.games.util.plugins.test.PluginTest
Creates a new instance of PluginTest

A F G I M N P

./apidocs/help-doc.html0000644000175000017500000001717607736654440015207 0ustar twernertwerner API Help

How This API Document Is Organized

This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.

Overview

The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.

Package

Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:

  • Interfaces (italic)
  • Classes
  • Exceptions
  • Errors

Class/Interface

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:

  • Class inheritance diagram
  • Direct Subclasses
  • All Known Subinterfaces
  • All Known Implementing Classes
  • Class/interface declaration
  • Class/interface description

  • Nested Class Summary
  • Field Summary
  • Constructor Summary
  • Method Summary

  • Field Detail
  • Constructor Detail
  • Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

Tree (Class Hierarchy)

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object.
  • When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
  • When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.

Deprecated API

The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.

Index

The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.

Prev/Next

These links take you to the next or previous class, interface, package, or related page.

Frames/No Frames

These links show and hide the HTML frames. All pages are available with or without frames.

Serialized Form

Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.

This help file applies to API documentation generated using the standard doclet.



./apidocs/serialized-form.html0000644000175000017500000001044407736354276016603 0ustar twernertwerner Serialized Form

Serialized Form



./www/0000755000175000017500000000000011367345257012012 5ustar twernertwerner./www/index.html0000644000175000017500000001200107757623550014004 0ustar twernertwerner
Projects Wiki Weblogs Forums JavaGames Home Java.net
Welcome to the Java Game Technology Utilities Project!
Overview

The JUtils Project hosts an implementation of a set of APIs utilized by other Java Game Technology Group projects (eg JInput,JOAl, JOGL). Some of those other projects may have build and/or run-time dependancies on the jutils.jar file which is built from the source hosted here.

Project Status
The intial implementation of the JUtils library is available for download from CVS.

The initial release contains support classes for a plug-in system that handles an arbitrary number of arbotrarily compelx plugins that each consist of a JAR file and support files (other jar files, native libs, etc.)

For more information, see the docs for the Plugins class in the CVS tree.

Getting Started

This project has been built in the following environment:

    This project has been built in the follwing environment.
  • Win32 (Win 2000 in the case of our machine)
  • Sun J2SDK 1.4.2 (available at java.sun.com)
  • MinGW 2.0.0 plus the following updates: (all available at www.mingw.org)
    • binutils 2.13.90
    • w32api-2.2
    • mingw-runtime-2.4
  • ANT 1.4.1 (available at www.apache.org)

 

Useful Links
 
./src/0000755000175000017500000000000011367345257011755 5ustar twernertwerner./src/java/0000755000175000017500000000000011367345254012673 5ustar twernertwerner./src/java/net/0000755000175000017500000000000011367345254013461 5ustar twernertwerner./src/java/net/java/0000755000175000017500000000000011367345254014402 5ustar twernertwerner./src/java/net/java/games/0000755000175000017500000000000011367345254015476 5ustar twernertwerner./src/java/net/java/games/util/0000755000175000017500000000000011367345255016454 5ustar twernertwerner./src/java/net/java/games/util/Version.java0000644000175000017500000000730010014776000020724 0ustar twernertwerner/* * Copyright (c) 2004 Sun Microsystems, Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * -Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * -Redistribution in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * Neither the name of Sun Microsystems, Inc. or the names of contributors may * be used to endorse or promote products derived from this software without * specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS * LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A * RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. * IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT * OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, * ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS * BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed or intended for use in the * design, construction, operation or maintenance of any nuclear facility. */ package net.java.games.util; /** * The version and build number of this implementation. * Version numbers for a release are of the form: w.x.y[-a]-z, where: *
    *
  • * w - the major version number of the release. This number should * start at 1. Typically, a bump in the major version number * signifies that the release breaks backwards compatibility * with some older release. *
  • *
  • * x - minor version number. This number starts at 0. A bump in * the minor version number signifies a release that has significant * new functionality. *
  • *
  • * y - minor-minor version number number. This number starts at 0. A * bump in the minor-minor version number signifies that new bug * fixes have been added to the build. *
  • *
  • * a - an optional build designator followed by a digit. Valid build * designators are: *
      *
    • alpha
    • *
    • beta
    • *
    *
  • *
  • * z - build number. This is used to specify the build number of the * release. This is usually only important to people that use * the daily build of a project. The format is the lower-case * letter 'b' followed by a two digit number. *
  • *
* * For example, the following are all valid version strings: *
    *
  • 1.1.2-b02
  • *
  • 1.3.5-alpha1-b19
  • *
  • 4.7.1-beta3-b20
  • *
* */ public final class Version { /** * Private constructor - no need for user to create * an instance of this class. */ private Version() { } /** * Version string of this build. */ private static final String version = "1.0.0-b01"; /** * Returns the verison string and build number of * this implementation. See the class descritpion * for the version string format. * * @return The version string of this implementation. */ public static String getVersion() { return version; } } ./src/java/net/java/games/util/plugins/0000755000175000017500000000000011367345256020136 5ustar twernertwerner./src/java/net/java/games/util/plugins/test/0000755000175000017500000000000011367345257021116 5ustar twernertwerner./src/java/net/java/games/util/plugins/test/NotAPlugin.java0000644000175000017500000000421007670227425023774 0ustar twernertwerner/* * NotAPlugin.java * * Created on April 21, 2003, 6:24 PM */ /***************************************************************************** * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistribution in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materails provided with the distribution. * * Neither the name Sun Microsystems, Inc. or the names of the contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed or intended for us in * the design, construction, operation or maintenance of any nuclear facility * *****************************************************************************/ package net.java.games.util.plugins.test; /** * * @author jeff */ public class NotAPlugin { /** Creates a new instance of NotAPlugin */ public NotAPlugin() { } } ./src/java/net/java/games/util/plugins/test/InheritedInterfacePlugin.java0000644000175000017500000000434007670227425026673 0ustar twernertwerner/* * InheritedInterfacePlugin.java * * Created on April 22, 2003, 12:23 AM */ /***************************************************************************** * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistribution in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materails provided with the distribution. * * Neither the name Sun Microsystems, Inc. or the names of the contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed or intended for us in * the design, construction, operation or maintenance of any nuclear facility * *****************************************************************************/ package net.java.games.util.plugins.test; /** * * @author jeff */ public class InheritedInterfacePlugin implements InterfaceNotAPlugin { /** Creates a new instance of InheritedInterfacePlugin */ public InheritedInterfacePlugin() { } } ./src/java/net/java/games/util/plugins/test/PluginTest.java0000644000175000017500000001024407676434401024056 0ustar twernertwerner/* * PluginTest.java * * Created on April 21, 2003, 4:59 PM */ /***************************************************************************** * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistribution of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * - Redistribution in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materails provided with the distribution. * * Neither the name Sun Microsystems, Inc. or the names of the contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * * You acknowledge that this software is not designed or intended for us in * the design, construction, operation or maintenance of any nuclear facility * *****************************************************************************/ package net.java.games.util.plugins.test; /** * * @author jeff */ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import net.java.games.util.plugins.Plugins; class ClassRenderer implements ListCellRenderer { JLabel label = new JLabel(); public Component getListCellRendererComponent(JList jList, Object obj, int param, boolean param3, boolean param4) { label.setText(((Class)obj).getName()); label.setForeground(Color.BLACK); label.setBackground(Color.WHITE); if (PluginTest.DEBUG) { System.out.println("Rendering: "+label.getText()); } return label; } } class ListUpdater implements Runnable{ Object[] objList; DefaultListModel mdl; public ListUpdater(JList jlist, Object[] list){ objList = list; mdl = (DefaultListModel)jlist.getModel(); } public void run() { mdl.clear(); for(int i=0;iany of the passed in set of * Interfaces (either directly or through inheritance.) * @param interfaces A set of interfaces to match against the interfaces * implemented by the plugin classes. * @return The list of plugin classes that implement at least * one member of the passed in set of interfaces. */ public Class[] getImplementsAny(Class[] interfaces){ List matchList = new ArrayList(pluginList.size()); Set interfaceSet = new HashSet(); for(int i=0;iall of the passed in set of * Interfaces (either directly or through inheritance.) * @param interfaces A set of interfaces to match against the interfaces * implemented by the plugin classes. * @return The list of plugin classes that implement at least * one member of the passed in set of interfaces. */ public Class[] getImplementsAll(Class[] interfaces){ List matchList = new ArrayList(pluginList.size()); Set interfaceSet = new HashSet(); for(int i=0;i