Friday, 15 January 2010

Java: Alternative to Multiple inheritance -


I have a class A that has to be extended to class B and C, both of which are provided by the third party and Do not pass one control of them because Java does not support multiple legacy. The use of the interface will not help in my case because I want to be the successor of the implementation of the base class and I do not copy my code into my class. Do not want to, or should I be aware of all the coming changes. / P>

What would be the best way to fulfill this requirement?

All suggestions will be highly appreciated!

  the extension of class A class B2B spreads the contents of B into class C 2. The goods belong to C-2B2 = new B2 (); C 2 c 2 = new c2 (); // or unmatched classes A is used to do everything in B2 and C2, so there is access to the inheritable properties of A and B and C.    

No comments:

Post a Comment