}
@Override
public ContentRepresentation readRepresentation(String contentType, Reader reader) {
try {
Class<? extends RepresentationReader> readerClass = representationReaders.get(new ContentType(contentType));
if (readerClass == null) {
throw new IllegalStateException("No representation reader for content type " + contentType + " registered.");
}
Constructor<? extends RepresentationReader> readerConstructor = readerClass.getConstructor(AbstractRepresentationFactory.class);
return readerConstructor.newInstance(this).read(reader);