Using Eclipse, how can I find which Java classes implement interface A AND interface B? Thanks.
I just had the same problem, and I'm really missing this feature in the Eclipse search dialog. Going through all classes manually wasn't very pleasant, so I used this nasty workaround. Given this structure:
public interface A {
public String x();
}
public interface B {
}
public class ImplementsBoth implements A, B {
@Override
public String x() {...}
}
public class ImplementsA implements A {
@Override
public String x() {...}
}
public class ImplementsB implements B {
}
I changed B into:
public interface B {
public void x();
}
This results in the following error for ImplementsBoth
:
The return type is incompatible with B.x()
Now it's possible to step through all these messages in the Problems view.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With