Class VersionFinder
- java.lang.Object
-
- nonapi.io.github.classgraph.utils.VersionFinder
-
public class VersionFinder extends java.lang.Object
Finds the version number of ClassGraph, and the version of the JDK.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VersionFinder.OperatingSystem
The operating system type.
-
Field Summary
Fields Modifier and Type Field Description static 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.static java.lang.String
JAVA_VERSION
Java version stringstatic VersionFinder.OperatingSystem
OS
The operating system type.
-
Constructor Summary
Constructors Constructor Description VersionFinder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getProperty(java.lang.String propName)
Get a system property (returning null if a SecurityException was thrown).static java.lang.String
getProperty(java.lang.String propName, java.lang.String defaultVal)
Get a system property (returning null if a SecurityException was thrown).static java.lang.String
getVersion()
-
-
-
Field Detail
-
JAVA_VERSION
public static final java.lang.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 java.lang.String getProperty(java.lang.String propName)
Get a system property (returning null if a SecurityException was thrown).
-
getProperty
public static java.lang.String getProperty(java.lang.String propName, java.lang.String defaultVal)
Get a system property (returning null if a SecurityException was thrown).
-
getVersion
public static java.lang.String getVersion()
- Returns:
- the version number of ClassGraph.
-
-