I have a number of different representations of the same kind of object; let's call it a Thing. "Thing" is a marker interface. ThingFormat0, ThingFormat1, ThingFormat2 etc. are all JavaBeans that implement Thing. (Because they are JavaBeans, a JSON marshaller automatically converts them to and from JSON automatically.) ThingFormat1 has just a few members like name and id. ThingFormat2 has URI links to other Things. In ThingFormat3 has ThingFormat1 representations of those other things etc.
The JSON serializer knows how to convert a URI automatically. (It works for any class where you can use toString() and the constructor ClassName(String string) to convert.)
I want to have a ThingFormat0 that behaves like a URI but implements the marker interface Thing.
public class ThingFormat0 extends URI implements Thing {}
This does not work because URI is a final class and can't be subclassed.
The only way I can think of to do this is by making a decorator (a very degenerate sort of decorator as it doesn't add any functionality to URI). This is easy in some "duck-typed" languages but more of a pain in Java, because I have to wrap a URI and implement all the methods of URI that I need. Is there an easier way?