<xml> </xml>

db4o |

# ObjectConstructor Interface

interface to allow instantiating objects by calling specific constructors.

For a list of all members of this type, see ObjectConstructor Members.

public interface ObjectConstructor : ObjectTranslator

#### Types that implement ObjectConstructor

Type | Description
--- | ---
TSerializable | translator for types that are marked with the Serializable attribute. The Serializable translator is provided to allow persisting objects that do not supply a convenient constructor. The use of this translator is recommended only if: - the persistent type will never be refactored - querying for type members is not necessary

#### Remarks

interface to allow instantiating objects by calling specific constructors.
Examples: ../com/db4o/samples/translators.
By writing classes that implement this interface, it is possible to define which constructor is to be used during the instantiation of a stored object.
Before starting a db4o session, translator classes that implement the

    ObjectConstructor

or ObjectTranslator need to be registered.
Example:

                Configuration config = Db4o.configure();

                ObjectClass oc = config.objectClass("package.className");

                oc.translate(new FooTranslator());

#### Requirements

Namespace: com.db4o.config

Assembly: db4o (in db4o.dll)

#### See Also

ObjectConstructor Members | com.db4o.config Namespace