{
final ResourceManager resourceManager = rootHandler.getResourceManager();
final ResourceKey source = rootHandler.getSource();
final ResourceKey target = resourceManager.deriveKey(source, file, map);
final DependencyCollector dc = rootHandler.getDependencyCollector();
final Resource resource = resourceManager.create(target, rootHandler.getContext(), targetClass);
dc.add(resource);
return resource.getResource();
}
catch (ResourceLoadingException rle)
{
throw rle;