Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] import of super class required ?

Hi all,

I have a class visibility problem I don't understand.

Suppose I have bundle A with classes A and B, and bundle C with class C.

bundle A (exports packages A and B)

package a;
public class A extends b.B { }

package b;
public class B {
	public void method() { }
}


bundle C: (imports only package a)

package c:
public class C {
   public C() {
      new A().method();
}



C calls a method from a super class of A with it cannot see. My guess
was that this should not be possible. And indeed, it doesn't even
compile with PDE. But if I make it compile (e.g. add bundle A to the
'automated management of dependencies') then it also works at runtime!

Am I missing something here ?

Tom


Back to the top