Because ResourceReader is a class with no constructors, it can not be extended. Thus, it is impossible to create a custom ResourceReader to feed to the set_resource_reader() method of org.sigrok.core.classes.Context. There should probably be an interface org.sigrok.core.interfaces.ResourceReader and a suitable overload of set_resource_reader(), like it works for log and datafeed callbacks.
ResourceReader has a constructor. But yeah, the class wasn't written with the intent to be bindable from Python or Java, although it could probably be made so if absolutely necessary.
I mean that the Java class does not have a constructor. This needs to work for pure Java apps on Android to be usable.
Anything else you need? Right now ResourceReader is not even reference-counted.
Hm, yes, there should be a way to hand over ownership to the Context like there is for LogCallbacks and DatafeedCallbacks.
And it will be necessary to wrap struct sr_resource, and deal with the in/out parameter somehow.
There is a SWIG feature called "directors" that allows you to subclass C++ classes in Java or other target languages. Basically, SWIG creates a class that wraps all virtual methods with its own hooks, and then calls into the target language class for those methods. I've not looked in detail but it sounds like that may be what's needed here.