Fork me on GitHub
#java
<
2022-03-31
>
Nundrum19:03:18

This needs a sanity check. I have an XFramePeer.

class XFramePeer extends XDecoratedPeer implements FramePeer
and want to call a method from XDecoratedPeer which is declared
abstract class XDecoratedPeer extends XWindowPeer
The rest of that chain of inheritance is public up to XBaseWindow. An example method is getShell. It's public. But I can't call it because `Can't call public method of non-public class` Running reflection on the XFramePeer object doesn't show any of the fields/methods of any superclass. I don't understand why they're not visible. Reference: https://github.com/openjdk/client/blob/master/src/java.desktop/unix/classes/sun/awt/X11/XFramePeer.java