PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>> type =
new PojoComponentType<JavaMappedService, JavaMappedReference, JavaMappedProperty<?>>();
type.setConstructorDefinition(ctorDef);
type.setImplementationScope(Scope.MODULE);
Method method = FooClient.class.getMethod("setFoo", Foo.class);
JavaInterfaceProcessorRegistry registry = new JavaInterfaceProcessorRegistryImpl();
ServiceContract<?> contract = registry.introspect(Foo.class);
contract.setCallbackClass(FooCallback.class);
contract.setCallbackName("callback");
JavaMappedReference mappedReference = new JavaMappedReference("foo", contract, method);
type.getReferences().put("foo", mappedReference);
ReferenceTarget refTarget = new ReferenceTarget();