Author: mturk
Date: Wed Apr 15 08:11:37 2009
New Revision: 765083

URL: http://svn.apache.org/viewvc?rev=765083&view=rev
Log:
Add Library version class

Added:
    
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Version.java
   (with props)

Added: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Version.java
URL: 
http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Version.java?rev=765083&view=auto
==============================================================================
--- 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Version.java
 (added)
+++ 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Version.java
 Wed Apr 15 08:11:37 2009
@@ -0,0 +1,67 @@
+/* Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.commons.runtime;
+
+/** The Version class is used to obtain the native
+ * library part of the Apache Commons Runtime version numbers.
+ * @since Runtime 1.0
+ *
+ */
+public final class Version {
+
+    private Version() {
+        // No instance
+    }
+
+    private static native int     get0(int what);
+    private static native boolean isDev();
+    private static native String  getBuildmark();
+
+    /** Major version
+     * <br />
+     * Major API changes that could cause compatibility problems for older
+     * programs such as structure size changes.  No binary compatibility is
+     * possible across a change in the major version.
+     */
+    public static final int     MAJOR = get0(0);
+
+    /** Minor version
+     * <br />
+     * Minor API changes that do not cause binary compatibility problems.
+     * Minor version might introduce new API.
+     */
+    public static final int     MINOR = get0(1);
+
+    /** Patch level
+     * <br />
+     * Patch level designates only bug fixing release.
+     */
+    public static final int     PATCH = get0(2);
+
+    /**
+     *  This symbol is defined for internal, "development" copies of ACR.
+     *  This symbol will be false for releases.
+     */
+    public static final boolean IS_DEVELOPMENT = isDev();
+
+    /**
+     * String representing the build mark of the time at which
+     * the native library was build.
+     */
+    public static final String  BUILDMARK = getBuildmark();
+
+}

Propchange: 
commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/Version.java
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to