Make JavaAdapter work with abstract base classes and protected constructors