{
ProtocolProxyFactory proxyFactory = (ProtocolProxyFactory) getObject();
Object proxy = proxyFactory.createProxy(iface);
InjectManager beanManager = InjectManager.create();
BeanBuilder<T> builder = beanManager.createBeanFactory(iface);
if (getName() != null) {
builder = builder.name(getName());
addOptionalStringProperty("name", getName());
builder.qualifier(Names.create(getName()));
if (getBindingList().size() == 0)
builder.qualifier(DefaultLiteral.DEFAULT);
}
for (Annotation binding : getBindingList()) {
builder = builder.qualifier(binding);
}
for (Annotation stereotype : getStereotypeList()) {
builder = builder.stereotype(stereotype.annotationType());
}
builder.stereotype(Configured.class);
_bean = builder.singleton(proxy);
beanManager.addBean(_bean);
}