samples/primitiveconstants/src-api2.0/api/API.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 20:46:27 +0100
changeset 408 9a439a79c6d0
permissions -rw-r--r--
Use scala 2.10.4 to compile on JDK8
jtulach@8
     1
package api;
jtulach@8
     2
jtulach@8
     3
public abstract class API {
jtulach@8
     4
    // BEGIN: theory.binary.constants.api2
jtulach@8
     5
    public static final int VERSION = 2;
jtulach@8
     6
    // END: theory.binary.constants.api2
jtulach@8
     7
jtulach@8
     8
    protected API() {
jtulach@8
     9
        System.err.println("Initializing version " + VERSION);
jtulach@8
    10
        init(API.VERSION);
jtulach@8
    11
        System.err.println("Properly initialized: " + this);
jtulach@8
    12
    }
jtulach@8
    13
jtulach@8
    14
    protected abstract void init(int version) throws IllegalStateException;
jtulach@8
    15
}