samples/primitiveconstants/src-impl/impl/Impl.java
author Jaroslav Tulach <jtulach@netbeans.org>
Sat, 14 Jun 2008 09:50:51 +0200
changeset 8 82ff02d7f861
child 133 50bf1b976c0d
permissions -rw-r--r--
constants demonstrated in real project
     1 package impl;
     2 import api.API;
     3 
     4 // BEGIN: theory.binary.constants.impl
     5 public class Impl extends API {
     6     protected void init(int version) throws IllegalStateException {
     7         if (version != API.VERSION) {
     8           throw new IllegalStateException("Not the right API version error!");
     9         }
    10     }
    11 // END: theory.binary.constants.impl
    12     
    13     public static void main(String[] args) {
    14         System.err.println("main expects version: " + API.VERSION);
    15         new Impl();
    16         System.err.println("done for version: " + API.VERSION);
    17     }
    18 }