3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 18:45:33 +00:00
z3/src/api/java/Version.java
2016-07-28 18:06:02 +01:00

84 lines
2.2 KiB
Java

/**
Copyright (c) 2012-2014 Microsoft Corporation
Module Name:
Version.java
Abstract:
Author:
@author Christoph Wintersteiger (cwinter) 2012-03-15
Notes:
**/
package com.microsoft.z3;
/**
* Version information.
* Remarks: Note that this class is static.
**/
public class Version
{
/**
* The major version
**/
public static int getMajor()
{
Native.IntPtr major = new Native.IntPtr(), minor = new Native.IntPtr(), build = new Native.IntPtr(), revision = new Native.IntPtr();
Native.getVersion(major, minor, build, revision);
return major.value;
}
/**
* The minor version
**/
public static int getMinor()
{
Native.IntPtr major = new Native.IntPtr(), minor = new Native.IntPtr(), build = new Native.IntPtr(), revision = new Native.IntPtr();
Native.getVersion(major, minor, build, revision);
return minor.value;
}
/**
* The build version
**/
public static int getBuild()
{
Native.IntPtr major = new Native.IntPtr(), minor = new Native.IntPtr(), build = new Native.IntPtr(), revision = new Native.IntPtr();
Native.getVersion(major, minor, build, revision);
return build.value;
}
/**
* The revision
**/
public static int getRevision()
{
Native.IntPtr major = new Native.IntPtr(), minor = new Native.IntPtr(), build = new Native.IntPtr(), revision = new Native.IntPtr();
Native.getVersion(major, minor, build, revision);
return revision.value;
}
/**
* A full version string
**/
public static String getFullVersion()
{
return Native.getFullVersion();
}
/**
* A string representation of the version information.
**/
public static String getString()
{
Native.IntPtr major = new Native.IntPtr(), minor = new Native.IntPtr(), build = new Native.IntPtr(), revision = new Native.IntPtr();
Native.getVersion(major, minor, build, revision);
return Integer.toString(major.value) + "." + Integer.toString(minor.value) + "."
+ Integer.toString(build.value) + "." + Integer.toString(revision.value);
}
}