Class VersionFinder
- java.lang.Object
-
- nonapi.io.github.classgraph.utils.VersionFinder
-
public class VersionFinder extends Object
Finds the version number of ClassGraph, and the version of the JDK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVersionFinder.OperatingSystemThe operating system type.
-
Field Summary
Fields Modifier and Type Field Description static intJAVA_MAJOR_VERSIONJava major version -- 7 for "1.7", 8 for "1.8.0_244", 9 for "9", 11 for "11-ea", etc.static StringJAVA_VERSIONJava version stringstatic VersionFinder.OperatingSystemOSThe operating system type.
-
Constructor Summary
Constructors Constructor Description VersionFinder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetProperty(String propName)Get a system property (returning null if a SecurityException was thrown).static StringgetProperty(String propName, String defaultVal)Get a system property (returning null if a SecurityException was thrown).static StringgetVersion()
-
-
-
Field Detail
-
JAVA_VERSION
public static final String JAVA_VERSION
Java version string
-
JAVA_MAJOR_VERSION
public static final int JAVA_MAJOR_VERSION
Java major version -- 7 for "1.7", 8 for "1.8.0_244", 9 for "9", 11 for "11-ea", etc.
-
OS
public static final VersionFinder.OperatingSystem OS
The operating system type.
-
-
Method Detail
-
getProperty
public static String getProperty(String propName)
Get a system property (returning null if a SecurityException was thrown).
-
getProperty
public static String getProperty(String propName, String defaultVal)
Get a system property (returning null if a SecurityException was thrown).
-
getVersion
public static String getVersion()
- Returns:
- the version number of ClassGraph.
-
-