public <T> NewManagedBean<T> createNewComponent(Class<T> clazz, Type apiType)
{
Asserts.nullCheckForClass(clazz);
NewManagedBean<T> comp;
DefinitionUtil definitionUtil = webBeansContext.getDefinitionUtil();
if (webBeansContext.getManagedBeanConfigurator().isManagedBean(clazz))
{
comp = new NewManagedBean<T>(clazz, WebBeansType.MANAGED, webBeansContext);
comp.setImplScopeType(new DependentScopeLiteral());
comp.setConstructor(defineConstructor(clazz));
definitionUtil.addConstructorInjectionPointMetaData(comp, comp.getConstructor());
definitionUtil.defineInjectedFields(comp);
definitionUtil.defineInjectedMethods(comp);
}
else if (EJBWebBeansConfigurator.isSessionBean(clazz, webBeansContext))
{
comp = new NewManagedBean<T>(clazz, WebBeansType.ENTERPRISE, webBeansContext);
comp.setImplScopeType(new DependentScopeLiteral());