samples/forjoe/src-api1.0/api/InterfaceThatJustJoeCanImplement.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
parent 153 b5cbb797ec0a
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
     1 package api;
     2 
     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     }
    12     
    13     public abstract void everyoneCallThisJoeWillHandleTheRequest();
    14 }
    15 // END: forjoe.InterfaceThatJustJoeCanImplement