|
Project JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.util.ClassFactory
public abstract class ClassFactory
This util class provides methods needed by class construction factories.
StructuredDocumentFactory,
AdvertisementFactory,
IDFactory,
net.jxta.impl.endpoint.WireFormatMessageFactory| Constructor Summary | |
|---|---|
protected |
ClassFactory()
Constructor for ClassFactory. |
| Method Summary | |
|---|---|
protected abstract Map |
getAssocTable()
Used by ClassFactory methods to get the mapping of keys to constructors. |
Iterator |
getAvailableKeys()
Return all of the available keys for this factory. |
protected abstract Class |
getClassForKey()
Used by ClassFactory methods to ensure that all keys used with the mapping are of the correct type. |
protected abstract Class |
getClassOfInstantiators()
Used by ClassFactory methods to ensure that all of the instance classes which register with this factory have the correct base class |
Set |
getEntrySet()
Returns an umodifiable Set containing all of the associations stored in this ClassFactory. |
protected Object |
getInstantiator(Object key)
Return the instantiator associated with the provided key. |
protected boolean |
registerAssoc(Object key,
Object instantiator)
Register a key and instance class with the factory. |
protected boolean |
registerAssoc(String className)
Register a class with the factory from its class name. |
protected boolean |
registerFromResources(String resourceName,
String propertyName)
Given a resource bundle identifier and a property name register instance classes. |
protected boolean |
registerFromString(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 Map getAssocTable()
protected abstract Class getClassForKey()
public Iterator getAvailableKeys()
getClassForKey.
getClassForKey.public Set getEntrySet()
Map.Entry.
protected abstract Class getClassOfInstantiators()
protected boolean registerFromResources(String resourceName,
String propertyName)
throws MissingResourceException
resourceName - name of the resource bundlepropertyName - name of the property.
MissingResourceException - if the resource bundle or
property cannot be located.protected boolean registerFromString(String classNamesString)
classNamesString - The class name list
protected boolean registerAssoc(String className)
throws Exception
className - The class name which will be regiestered.
Exception - when an error occurs.
protected boolean registerAssoc(Object key,
Object instantiator)
key - The key to register.instantiator - The instantiator object which will be registered for this key.
protected Object getInstantiator(Object key)
throws NoSuchElementException
key - The identifier for the Instantiator class to be returned.
NoSuchElementException - if the key has not been registerd.
|
JXTA J2SE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||