Class VersionFinder
java.lang.Object
nonapi.io.github.classgraph.utils.VersionFinder
Finds the version number of ClassGraph, and the version of the JDK.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe operating system type. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanJava is EA release -- true for "11-ea", etc.static final intJava major version -- 7 for "1.7", 8 for "1.8.0_244", 9 for "9", 11 for "11-ea", etc.static final intJava minor version -- 0 for "11.0.4"static final intJava minor version -- 4 for "11.0.4"static final StringJava version string.static final VersionFinder.OperatingSystemThe operating system type. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 StringGet the version number of ClassGraph.
-
Field Details
-
OS
The operating system type. -
JAVA_VERSION
Java version string. -
JAVA_MAJOR_VERSION
public static final int JAVA_MAJOR_VERSIONJava major version -- 7 for "1.7", 8 for "1.8.0_244", 9 for "9", 11 for "11-ea", etc. -
JAVA_MINOR_VERSION
public static final int JAVA_MINOR_VERSIONJava minor version -- 0 for "11.0.4" -
JAVA_SUB_VERSION
public static final int JAVA_SUB_VERSIONJava minor version -- 4 for "11.0.4" -
JAVA_IS_EA_VERSION
public static final boolean JAVA_IS_EA_VERSIONJava is EA release -- true for "11-ea", etc.
-
-
Method Details
-
getProperty
-
getProperty
Get a system property (returning null if a SecurityException was thrown).- Parameters:
propName- the property namedefaultVal- the default value for the property- Returns:
- the property value, or the default if the property is not defined.
-
getVersion
Get the version number of ClassGraph.- Returns:
- the version number of ClassGraph.
-