Japi reverse comparisons (eg finalness and SimpleDoc)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/26/06, Roman Kennke <roman@xxxxxxxxxx> wrote:
> A little update on that one: the field accessibleParent is obviously a
> field that is inherited from AccessibleContext. Is it possible that in
> Sun's API this field is shadowed by a private field in
> AccessibleJTreeNode?

That's the usual reason why a public or protected inherited field
might not show up in the subclass, yes...

Easy to verify in a black box way by writing a test class like this
and trying to compile it against the JDK, and watching what error
message you get:

public class AccessibleParentFieldTest extends
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode {
  public static void main(String[] args) {
    System.out.println(super.accessibleParent);
  }
}

If the "shadowed by a private field" theory is right, this should be a
compile error saying that super.accessibleParent isn't accessible.

Stuart.
--
http://sab39.dev.netreach.com/


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux