ObjectFactory<?> factory = null;
if (CallableReference.class.isAssignableFrom(element.getType())) {
businessInterface =
JavaIntrospectionHelper.getBusinessInterface(element.getType(), element.getGenericType());
factory =
new CallableReferenceObjectFactory(new CallbackWireObjectFactory(businessInterface,
proxyFactory, wires));
} else {
factory = new CallbackWireObjectFactory(businessInterface, proxyFactory, wires);
}
if (!(element.getAnchor() instanceof Constructor)) {
instanceFactoryProvider.getInjectionSites().add(element);
}
instanceFactoryProvider.setObjectFactory(element, factory);