/** * Autobuilds a class by finding the public constructor with the most parameters. Services and resources will be * injected into the parameters of the constructor. * * @param <T> * @param clazz the type of object to instantiate (not null) * @return the instantiated instance (not null) * @throws RuntimeException if the autobuild fails * @see MasterObjectProvider */ public <T> T autobuild(Class<T> clazz) { return getRegistry().autobuild(clazz); }
public final <T> T autobuild(Class<T> clazz) { return registry.autobuild(clazz); }
public final <T> T autobuild(String description, Class<T> clazz) { return registry.autobuild(description, clazz); }
@Override protected Object createTest() throws Exception { org.apache.tapestry5.ioc.Registry registry = registryManager.getOrCreateRegistry(); return registry.autobuild(getTestClass().getJavaClass()); }