info.magnolia.objectfactory
Class ObjectManufacturer
java.lang.Object
info.magnolia.objectfactory.ObjectManufacturer
public class ObjectManufacturer
- extends Object
Creates objects by dynamically resolving the parameters to use.
- Version:
- $Id$
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ObjectManufacturer
public ObjectManufacturer()
newInstance
public Object newInstance(Class<?> clazz,
ParameterResolver... parameterResolvers)
- Creates an object of the given type using parameters provided by a set of parameter resolvers. Will first look
for a constructor annotated with @Inject, it can be public, private, protected or package private. It will
then look at public constructors and use the greediest. The greediest constructor is the one that has the most
number of arguments that the parameter resolvers can fulfill. If there is more than one constructor that
qualifies as greediest it is unspecified which one will be used.
Copyright © 2003–2014 Magnolia International Ltd.. All rights reserved.