|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--net.jxta.util.ClassFactory
This util class provides methods needed by class construction factories. FIXME bondolo@jxta.org 20010223 This implementation needs a way to return the list of key -> class associations
StructuredDocumentFactory,
AdvertisementFactory,
IDFactory| Constructor Summary | |
protected |
ClassFactory()
Constructor for ClassFactory. |
| Method Summary | |
protected abstract java.util.Hashtable |
getAssocTable()
Used by ClassFactory methods to get the mapping of keys to constructors. |
protected java.util.Enumeration |
getAvailableKeys()
Return all of the available keys for this factory. |
protected abstract java.lang.Class |
getClassForKey()
Used by ClassFactory methods to ensure that all keys used with the mapping are of the correct type. |
protected abstract java.lang.Class |
getClassOfInstantiators()
Used by ClassFactory methods to ensure that all of the instance classes which register with this factory have the correct base class |
protected java.lang.Object |
getInstantiator(java.lang.Object key)
Return the instantiator associated with the provided key. |
protected boolean |
registerAssoc(java.lang.Object key,
java.lang.Object instantiator)
Register a key and instance class with the factory. |
protected boolean |
registerAssoc(java.lang.String className)
Register a class with the factory from its class name. |
protected boolean |
registerFromResources(java.lang.String resourceName,
java.lang.String propertyName)
Given a resource bundle identifier and a property name register instance classes. |
protected boolean |
registerFromString(java.lang.String classNamesString)
Register instance classes given a string containing class names which must be found on the current class path. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected ClassFactory()
| Method Detail |
protected abstract java.util.Hashtable getAssocTable()
protected abstract java.lang.Class getClassForKey()
protected java.util.Enumeration getAvailableKeys()
getClassForKey.getClassForKey.protected abstract java.lang.Class getClassOfInstantiators()
protected boolean registerFromResources(java.lang.String resourceName,
java.lang.String propertyName)
throws java.util.MissingResourceException
resourceName - name of the resource bundlepropertyName - name of the property.java.util.MissingResourceException - if the resource bundle or
property cannot be located.protected boolean registerFromString(java.lang.String classNamesString)
classNamesString - The class name list
protected boolean registerAssoc(java.lang.String className)
throws java.lang.Exception
className - The class name which will be regiestered.java.lang.Exception - when an error occurs.
protected boolean registerAssoc(java.lang.Object key,
java.lang.Object instantiator)
key - The key to register.instantiator - The instantiator object which will be registered for this key.
protected java.lang.Object getInstantiator(java.lang.Object key)
throws java.util.NoSuchElementException
key - The identifier for the Instantiator class to be returned.java.util.NoSuchElementException - if the key has not been registerd.
|
Project JXTA | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||