ServiceResponse serviceResponse = createServiceResponse(instances);
return serviceResponse;
}
public ServiceResponse createServiceResponse(Collection instances) {
ServiceResponse serviceResponse = (ServiceResponse) GeneratedClassFactory.newInstance(serviceResponseClass);
GeneratedInstanceInterceptor.setProperty(serviceResponse, "containers", Transform.map(new Unary<Object, ServiceContainer>() {
public ServiceContainer f(Object item) {
return createServiceContainer(item, config.getVersion(item));
}
}, instances));