jtulach@76: package api; jtulach@76: jtulach@76: // BEGIN: forjoe.InterfaceThatJustJoeCanImplement jtulach@76: public abstract class InterfaceThatJustJoeCanImplement { jtulach@76: protected InterfaceThatJustJoeCanImplement() { jtulach@76: if (!"impl.joe.JoesImpl".equals(getClass().getName())) { jtulach@132: throw new IllegalStateException( jtulach@132: "Sorry, you are not allowed to implement this class" jtulach@132: ); jtulach@76: } jtulach@76: } jtulach@76: jtulach@76: public abstract void everyoneCallThisJoeWillHandleTheRequest(); jtulach@76: } jtulach@76: // END: forjoe.InterfaceThatJustJoeCanImplement