goodslib
Class ClassLibrary
java.lang.Object
goodsjpi.Persistent
goodslib.HashTable
goodslib.ClassLibrary
- All Implemented Interfaces:
- java.io.Serializable
- public class ClassLibrary
- extends HashTable
Class providing load and store of classes from/to database
- See Also:
- Serialized Form
Field Summary |
protected goodslib.PersistentClassLoader |
loader
|
Method Summary |
java.lang.Class |
loadClass(java.lang.String name)
Load class from the storage. |
void |
storeClass(java.lang.String className)
Store class with specified name in the storage.
|
Methods inherited from class java.lang.Object |
equals, getClass, notify, notifyAll, toString, wait, wait, wait |
loader
protected transient goodslib.PersistentClassLoader loader
ClassLibrary
public ClassLibrary()
storeClass
public void storeClass(java.lang.String className)
throws java.io.IOException
- Store class with specified name in the storage.
Parameter className should be fully qualified Java class name
separated by period character. File name of the class file is produced
by replacing period character with OS file separator symbol and
appending suffix ".class". Then contents of the file is placed in GOODS
storage and reference to it is inserted in the hash table. This class
can throw IOException if it fails to read the class file data.
- Throws:
java.io.IOException
loadClass
public java.lang.Class loadClass(java.lang.String name)
- Load class from the storage. The name parameter should be the same as
in correspondent storeClass method. This name is used as
search key in hash table with stored classes.
Class is loaded and resolved using special persistent class loader and
pointer to created Class object is returned. If no class
definition was found in the hash table, than null is returned.