Package cdc.args
Class Singleton<T>
- java.lang.Object
-
- cdc.args.Singleton<T>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tcreate(Args args)Creates aTinstance.List<FormalArgs>getCreationFormalArgsList()Returns a list of supported creation arguments.ArgsgetMeta()Class<T>getObjectClass()
-
-
-
Constructor Detail
-
Singleton
public Singleton(Class<T> objectClass, T object, Args meta)
Creates a Singleton factory.- Parameters:
objectClass- Class of created objects.object- The singleton object to use. It is this instance that will be returned each time a creation is asked.meta- The meta data associated to this factory.
-
-
Method Detail
-
getObjectClass
public Class<T> getObjectClass()
- Specified by:
getObjectClassin interfaceFactory<T>- Returns:
- The class of built objects.
-
getMeta
public Args getMeta()
-
getCreationFormalArgsList
public List<FormalArgs> getCreationFormalArgsList()
Description copied from interface:FactoryReturns a list of supported creation arguments.This list must not be empty.
If creation does not need any arguments, a list containing FormalArgs.NO_FARGS should be returned.- Specified by:
getCreationFormalArgsListin interfaceFactory<T>- Returns:
- A list of supported creation arguments.
-
-