author | Jaroslav Tulach <jaroslav.tulach@apidesign.org> |
Fri, 03 Apr 2020 16:32:36 +0200 | |
changeset 416 | 9ed8788a1a4e |
parent 153 | b5cbb797ec0a |
permissions | -rw-r--r-- |
1 package api;
3 // BEGIN: forjoe.InterfaceThatJustJoeCanImplement
4 public abstract class InterfaceThatJustJoeCanImplement {
5 protected InterfaceThatJustJoeCanImplement() {
6 if (!"impl.joe.JoesImpl".equals(getClass().getName())) {
7 throw new IllegalStateException(
8 "Sorry, you are not allowed to implement this class"
9 );
10 }
11 }
13 public abstract void everyoneCallThisJoeWillHandleTheRequest();
14 }
15 // END: forjoe.InterfaceThatJustJoeCanImplement