code: public ResourceRegistry build(ResourceLookup resourceLookup, ModuleRegistry moduleRegistry, ServiceUrlProvider serviceUrl) {
  		Set<Class<?>> jsonApiResources = resourceLookup.getResourceClasses();
  
  		Set<ResourceInformation> resourceInformationSet = new HashSet<>(jsonApiResources.size());
  		
  
  		for (Class<?> clazz : jsonApiResources) {
  			resourceInformationSet.add(resourceInformationBuilder.build(clazz));
  			LOGGER.trace("{} registered as a resource", clazz);
  		}
  
  		Set<RegistryEntry> registryEntries = new HashSet<>(resourceInformationSet.size());
  		for (ResourceInformation resourceInformation : resourceInformationSet) {
  			Class<?> resourceClass = resourceInformation.getResourceClass();
  
  			ResourceEntry resourceEntry = repositoryEntryBuilder.buildResourceRepository(resourceLookup, resourceClass);
  			LOGGER.trace("{} has a resource repository {}", resourceInformation.getResourceClass(), resourceEntry);
  			List<ResponseRelationshipEntry> relationshipEntries = repositoryEntryBuilder.buildRelationshipRepositories(resourceLookup, resourceClass);
  			LOGGER.trace("{} has relationship repositories {}", resourceInformation.getResourceClass(), relationshipEntries);
  
  			ResourceRepositoryInformation repositoryInformation = new ResourceRepositoryInformationImpl(null, resourceInformation.getResourceType(), resourceInformation);
  			registryEntries.add(new RegistryEntry(repositoryInformation, resourceEntry, relationshipEntries));
  		}
  
  		ResourceRegistry resourceRegistry = new ResourceRegistryImpl(moduleRegistry, serviceUrl);
  		for (RegistryEntry registryEntry : registryEntries) {
  			Class<?> resourceClass = registryEntry.getResourceInformation().getResourceClass();
  			RegistryEntry registryEntryParent = findParent(resourceClass, registryEntries);
  			registryEntry.setParentRegistryEntry(registryEntryParent);
  			resourceRegistry.addEntry(resourceClass, registryEntry);
  		}
  
  		return resourceRegistry;
  	}
docs: Uses a {@link ResourceLookup} to get all resources and repositories
  associated with found resource.
  
  @param resourceLookup
  Lookup for getting all resource classes.
  @param serviceUrl
  URL to the service
  @return an instance of ResourceRegistry