EDITED:
Straight to the point... I have a class
public class P_Gen{
protected String s;
protected Object oP_Gen;
protected Object oP_Gen2;
public P_Gen(String str){
s = str;
oP_Gen = new MyClass(this);
oP_Gen2 = new MyClass2(this);
}
}
Extended class:
public class P extends P_Gen{
protected Object oP;
public P(String str){
super(str);
oP = new MyClass(this);
}
}
MyClass:
public class MyClass{
protected Object oMC;
public MyClass(P extendedObject){
this.oMC = extendedObject.oP;
}
}
MyClass2:
public class MyClass2{
protected Object oMC2;
public MyClass(P_Gen thisObject){
this.oMC2 = thisObject.oP;
}
}
The Class P_Gen shown above gives me an error for line :
oP_Gen = new MyClass(this);
stating "cannot find symbol constructor MyClass(P_Gen)."
What i want to achieve is to make P.oP available from MyClass2.
My initial thought were that P.this === P_Gen.this. In other word, P_Gen disappear when called from super()
and what is left is only P the extended class.