apptools.naming.object_factory module

The base class for all object factories.

class apptools.naming.object_factory.ObjectFactory[source]

Bases: HasTraits

The base class for all object factories.

An object factory accepts some information about how to create an object (such as a reference) and returns an instance of that object.

get_object_instance(state, name, context)[source]

Creates an object using the specified state information.

Returns None if the factory cannot create the object (ie. it does not recognise the state passed to it).