I have attached some more code below. If the spec says that you either
annotate the interface or the class/superclass that you can mentally
remove the getSelf() defined in Device. It would move into the
concrete implementation.
interface Device {
@GET
Device getSelf();
}
@Path("devices")
class RootResource {
Device getDevice(String id)
}
class Device1 implements Device {
public Device getSelf()
@GET
@Path("something")
public Object getSomething() { // Get something }
}
class Device2 implements Device {
public Device getSelf() { return this; }
@GET
@Path("else")
public Object getSomethingElse()
}