return resource;
}
@SuppressWarnings("unchecked")
private <R> R lookupResource(String key) {
ResourceProviderService provider = lookupOSGI(key);
if (provider != null) {
return (R) provider.getImage(key);
}
throw new IllegalArgumentException("No provider known for '" + key
+ "'.");
}