Does eclipse have a tool that can create Merged from A and B ?
public class A {
int a;
public int getA(){
return A;
}
}
public class B extends A {
int b;
public int getB(){
return b;
}
}
public class Merged {
int a;
int b;
public int getA(){
return A;
}
public int getB(){
return b;
}
}
I don’t think so. It’s not so simple task. Your example is simple, but consider this:
As you can see, its hard to automate. And what if some class in this hierarchy extends some lib class, for which you don’t have sources?
So, merging is hard, and very very bad, thats why I don’t think anyone wrote such tool.