3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 03:15:50 +00:00
z3/src/api/java/Version.java
Christoph M. Wintersteiger d7a62baef4 Improved memory use of the Java API. Thanks to Joerg Pfaehler for reporting this issue!
+ formatting

Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2015-01-30 21:10:22 -06:00

76 lines
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 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);
}
}