I can think of a way to make it
difficult to implement an interface, although not totally impossible. It involves mandating use of a specific
IDE, so it's not very practical.
1) Declare your interface "I" in some package "p".
2) Include one method "m" in "I" which returns a package-protected type "T" -- i.e., a class which isn't visible outside of "p". "m" doesn't need to do anything useful.
3) Provide your one implementation inside "p".
So far, all this does is make it impossible to implement that interface without returning null from "m", since classes outside of "p" can't create instances of "T".
4) Use IntelliJ IDEA, which includes an enforceable @NotNull annotation, and apply @NotNull to method "m" in "I". The IDE would then try very hard to prevent anyone from returning null from an implementation of "m".
Now, this wouldn't be
impossible to do, but it would be hard enough that the programmer would stop to wonder why the heck you made it so difficult!
[ November 01, 2008: Message edited by: Ernest Friedman-Hill ]