org.qi4j.api.object

## Interface ObjectFactory

- All Known Subinterfaces:
    Module, ModuleSpi

      public interface ObjectFactory

  This factory creates and injects POJO's.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `injectTo(Object instance, Object... uses)` Inject an existing instance.
    `<T> T` | `newObject(Class<T> type, Object... uses)` Create new objects of the given type.

- - ### Method Detail

    - #### newObject

          <T> T newObject(Class<T> type,
                        Object... uses)
                      throws NoSuchObjectException,
                             ConstructionException

      Create new objects of the given type.
      Parameters:
        `type` - an object class which will be instantiated.
      Returns:
        new objects.
      Throws:
        `ConstructionException` - Thrown if instantiation fails.
        `NoSuchObjectException` - Thrown if `type` class is not an object.

    - #### injectTo

          void injectTo(Object instance,
                      Object... uses)
                        throws ConstructionException

      Inject an existing instance. Only fields and methods will be called.
      Parameters:
        `instance` -
      Throws:
        `ConstructionException`