leafchat.core.api
Interface Factory


public interface Factory

Implement this in factory classes


Method Summary
<C extends FactoryObject>
C
newInstance(java.lang.Class<C> objectInterface)
          Requests factory to create a new object implementing the given interface.
 

Method Detail

newInstance

<C extends FactoryObject> C newInstance(java.lang.Class<C> objectInterface)
                                    throws GeneralException
Requests factory to create a new object implementing the given interface. (If a factory only implements one interface, it can ignore the parameter.)

Parameters:
objectInterface - Interface desired
Returns:
New object
Throws:
GeneralException - Factory may throw this exception if necessary


Copyright © 2011 Samuel Marshall. All rights reserved.