|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ModFactory
This class is used to load modules, register these modules with the appropriate registry, and to get instances of the modules for use with the program.
Constructor Summary | |
ModFactory()
|
Method Summary | |
static ModFactory |
getInstance()
This method returns an instance of this class. |
java.lang.Object |
getInstance(java.lang.Class type,
java.lang.String key)
This method is used to get an instance of a particular class, with the appropriate key. |
java.util.List |
getKeys()
This method is used to return the List of all the modules keys that are currently loaded. |
java.net.URL |
getModUrl(java.lang.String key)
This method is used to get the location of the module's jar file. |
java.lang.String |
getName(java.lang.String key)
This method is used to get the name of the class that is used for this module. |
void |
loadModules(java.io.File path)
This method loads the modules in the specified path and registers them with the registry. |
void |
loadModules(java.io.File[] paths)
This method loads and registers modules in the specified paths. |
void |
register(ModSpec spec)
This method registers the module with the registry for later retrieval. |
void |
register(ModSpec[] specs)
This method registers the module specs with the registry. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ModFactory()
Method Detail |
public void loadModules(java.io.File path) throws java.io.IOException
java.io.IOException
- from the file scanning.public java.net.URL getModUrl(java.lang.String key)
public java.lang.String getName(java.lang.String key)
public java.lang.Object getInstance(java.lang.Class type, java.lang.String key)
public static ModFactory getInstance()
public void loadModules(java.io.File[] paths) throws java.io.IOException
java.io.IOException
- from the scan operation.public java.util.List getKeys()
public void register(ModSpec spec)
public void register(ModSpec[] specs)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |