Class SharedObjectFactory
- java.lang.Object
- 
- org.eclipse.ecf.core.sharedobject.SharedObjectFactory
 
- 
- All Implemented Interfaces:
- ISharedObjectFactory
 
 public class SharedObjectFactory extends Object implements ISharedObjectFactory Factory for creatingISharedObjectinstances. This class provides ECF clients an entry point to constructingISharedObjectinstances.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static ISharedObjectFactoryinstance
 - 
Constructor SummaryConstructors Modifier Constructor Description protectedSharedObjectFactory()
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
instanceprotected static ISharedObjectFactory instance 
 
- 
 - 
Method Detail- 
getDefaultpublic static ISharedObjectFactory getDefault() 
 - 
addDescriptionpublic SharedObjectTypeDescription addDescription(SharedObjectTypeDescription description) - Specified by:
- addDescriptionin interface- ISharedObjectFactory
 
 - 
getDescriptionspublic List getDescriptions() Description copied from interface:ISharedObjectFactoryGet a collection of the SharedObjectTypeDescriptions currently known to this factory. This allows clients to query the factory to determine what if any other SharedObjectTypeDescriptions are currently registered with the factory, and if so, what they are.- Specified by:
- getDescriptionsin interface- ISharedObjectFactory
- Returns:
- List of SharedObjectTypeDescription instances. Will not be null.
 
 - 
getDescriptions0protected List getDescriptions0() 
 - 
addDescription0protected SharedObjectTypeDescription addDescription0(SharedObjectTypeDescription n) 
 - 
containsDescriptionpublic boolean containsDescription(SharedObjectTypeDescription scd) Description copied from interface:ISharedObjectFactoryCheck to see if a given named description is already contained by this factory- Specified by:
- containsDescriptionin interface- ISharedObjectFactory
- Parameters:
- scd- the SharedObjectTypeDescription to look for
- Returns:
- true if description is already known to factory, false otherwise
 
 - 
containsDescription0protected boolean containsDescription0(SharedObjectTypeDescription scd) 
 - 
getDescription0protected SharedObjectTypeDescription getDescription0(SharedObjectTypeDescription scd) 
 - 
getDescription0protected SharedObjectTypeDescription getDescription0(String name) 
 - 
getDescriptionByNamepublic SharedObjectTypeDescription getDescriptionByName(String name) throws SharedObjectCreateException Description copied from interface:ISharedObjectFactoryGet the known SharedObjectTypeDescription given it's name.- Specified by:
- getDescriptionByNamein interface- ISharedObjectFactory
- Returns:
- SharedObjectTypeDescription found. Null if description not found.
- Throws:
- SharedObjectCreateException
 
 - 
createSharedObjectpublic ISharedObject createSharedObject(SharedObjectTypeDescription desc, Object[] args) throws SharedObjectCreateException Description copied from interface:ISharedObjectFactoryCreate ISharedObject instance. Given a SharedObjectTypeDescription object, a String [] of argument types, and an Object [] of parameters, this method will- lookup the known SharedObjectTypeDescriptions to find one of matching name
- if found, will retrieve or create an ISharedObjectInstantiator for that description
- Call the ISharedObjectInstantiator.createInstance method to return an instance of ISharedObject
 - Specified by:
- createSharedObjectin interface- ISharedObjectFactory
- Parameters:
- desc- the SharedObjectTypeDescription to use to create the instance
- args- an Object [] of arguments passed to the createInstance method of the ISharedObjectInstantiator
- Returns:
- a valid instance of ISharedObject. Will not be null.
- Throws:
- SharedObjectCreateException- if shared object cannot be created
 
 - 
createSharedObjectpublic ISharedObject createSharedObject(String descriptionName) throws SharedObjectCreateException Description copied from interface:ISharedObjectFactoryCreate ISharedObject instance. Given a SharedObjectTypeDescription name, this method will- lookup the known SharedObjectTypeDescriptions to find one of matching name
- if found, will retrieve or create an ISharedObjectInstantiator for that description
- Call the ISharedObjectInstantiator.createInstance method to return an instance of ISharedObject
 - Specified by:
- createSharedObjectin interface- ISharedObjectFactory
- Parameters:
- descriptionName- the SharedObjectTypeDescription name to lookup
- Returns:
- a valid instance of ISharedObject. Will not be null.
- Throws:
- SharedObjectCreateException
 
 - 
createSharedObjectpublic ISharedObject createSharedObject(String descriptionName, Object[] args) throws SharedObjectCreateException Description copied from interface:ISharedObjectFactoryCreate ISharedObject instance. Given a SharedObjectTypeDescription name, this method will- lookup the known SharedObjectTypeDescriptions to find one of matching name
- if found, will retrieve or create an ISharedObjectInstantiator for that description
- Call the ISharedObjectInstantiator.createInstance method to return an instance of ISharedObject
 - Specified by:
- createSharedObjectin interface- ISharedObjectFactory
- Parameters:
- descriptionName- the SharedObjectTypeDescription name to lookup
- args- the Object [] of arguments passed to the ISharedObjectInstantiator.createInstance method
- Returns:
- a valid instance of IContainer. Will not be null.
- Throws:
- SharedObjectCreateException
 
 - 
removeDescriptionpublic SharedObjectTypeDescription removeDescription(SharedObjectTypeDescription scd) Description copied from interface:ISharedObjectFactoryRemove given description from set known to this factory.- Specified by:
- removeDescriptionin interface- ISharedObjectFactory
- Parameters:
- scd- the SharedObjectTypeDescription to remove
- Returns:
- the removed SharedObjectTypeDescription, null if nothing removed
 
 - 
removeDescription0protected SharedObjectTypeDescription removeDescription0(SharedObjectTypeDescription n) 
 
- 
 
-