public ManagedReference createInstance(final Object instance) {
final BeanManager beanManager = this.beanManager.getValue();
final InjectionTarget injectionTarget = getInjectionTarget(instance.getClass());
final CreationalContext context = beanManager.createCreationalContext(null);
injectionTarget.inject(instance, context);
injectionTarget.postConstruct(instance);
return new WeldManagedReference(injectionTarget, context, instance);
}
public InjectedValue<BeanManager> getBeanManager() {
return beanManager;