27,34 → 27,51 |
// $Id$ |
|
/** |
* API versioning |
* API versioning. |
* |
* Versioning is inspired by libtool's rules |
* {@link http://www.gnu.org/software/libtool/manual.html#Versioning}, i.e. |
* <pre> |
* API version = "current" |
* API revvision = "revision" |
* API min_supported_revision = "current" - "age" |
* </pre> |
* |
* Release numbers are meaningful and composed like: |
* <code>Version.MinSupported.Revision.build#</code>, |
* so, e.g. release 2.3.0 won't valid since MinSupported can't be |
* greater than version. |
*/ |
public final class API { |
// Release will be REVISION.(IMPLEMENTATION-1) i.e. |
// for REVISION=1 and IMPLEMENTATION=1, release would be 1.0 |
|
/** |
* API Revision. |
* Newer revisions might break backwards compatibility (see |
* {@link #MIN_SUPPORTED_REVISION}). |
* API Version. |
* Newer versions might break backwards compatibility. |
*/ |
public static final int REVISION = 1; |
public static final int VERSION = 1; |
|
/** |
* Implementation of the API revision. |
* Different implementations of an API are guaranteed to maintain |
* the API unchanged. |
* @see #REVISION |
* Revision of the API Version. |
* A newer revision might add features but not change the meaning of |
* existing ones neither remove any of them. |
* @see #VERSION |
*/ |
public static final int IMPLEMENTATION = 1; |
public static final int REVISION = 0; |
|
/** |
* Minimum API revision supported by this implementation. |
* Number of previous Versions supported. |
* For future use. |
* {@see #VERSION} |
* {@see #MIN_SUPPORTED_VERSION} |
*/ |
public static final int AGE = 0; |
|
/** |
* Minimum API version supported by this implementation. |
* For future use. |
* In principle a new API should provide support for previous revisions, |
* in case it doesn't, this constant will hold the lower supported API. |
* @see #REVISION |
* @pre MIN_SUPPORTED_REVISION <= REVISION |
* @see #VERSION |
* @pre MIN_SUPPORTED_VERSION <= VERSION |
*/ |
public static final int MIN_SUPPORTED_REVISION = 1; |
public static final int MIN_SUPPORTED_VERSION = VERSION - AGE; |
} |