samples/primitiveconstants/src-impl/impl/Impl.java
changeset 8 82ff02d7f861
child 133 50bf1b976c0d
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/primitiveconstants/src-impl/impl/Impl.java	Sat Jun 14 09:50:51 2008 +0200
     1.3 @@ -0,0 +1,18 @@
     1.4 +package impl;
     1.5 +import api.API;
     1.6 +
     1.7 +// BEGIN: theory.binary.constants.impl
     1.8 +public class Impl extends API {
     1.9 +    protected void init(int version) throws IllegalStateException {
    1.10 +        if (version != API.VERSION) {
    1.11 +          throw new IllegalStateException("Not the right API version error!");
    1.12 +        }
    1.13 +    }
    1.14 +// END: theory.binary.constants.impl
    1.15 +    
    1.16 +    public static void main(String[] args) {
    1.17 +        System.err.println("main expects version: " + API.VERSION);
    1.18 +        new Impl();
    1.19 +        System.err.println("done for version: " + API.VERSION);
    1.20 +    }
    1.21 +}