I have the following Situation:
public interface A {
void doSomethingCool();
}
public interface B extends A {
void doSomethingVeryBCool();
}
public inte
You cannot directly enforce the interface not being implemented, however you can make the interface package-local:
interface A {...} //no public
This way classes outside that package cannot see the interface.
EDIT: however, this does mean that you cannot do something like
A a = getA();
outside the package because A cannot be resolved.