final InjectionTarget injectionTarget = getInjectionTarget(clazz);
return new ManagedReferenceFactory() {
@Override
public ManagedReference getReference() {
final CreationalContext context = beanManager.createCreationalContext(null);
final Object instance = injectionTarget.produce(context);
injectionTarget.inject(instance, context);
injectionTarget.postConstruct(instance);
return new WeldManagedReference(injectionTarget, context, instance);
}
};