org.qi4j.api.object
Interface ObjectBuilderFactory


public interface ObjectBuilderFactory

This factory creates builders for POJO's.


Method Summary
<T> T
newObject(Class<T> type)
          Create new objects of the given type.
<T> ObjectBuilder<T>
newObjectBuilder(Class<T> type)
          Create a builder for creating new objects of the given type.
 

Method Detail

newObjectBuilder

<T> ObjectBuilder<T> newObjectBuilder(Class<T> type)
                                  throws NoSuchObjectException,
                                         ConstructionException
Create a builder for creating new objects of the given type.

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

newObject

<T> T newObject(Class<T> type)
            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.