-
public interface JREInfoProvider
Provides information about used Java runtime
-
-
Method Summary
Modifier and Type Method Description abstract Unit
assertVersion(String message, Function1<Integer, Boolean> condition)
Does nothing if condition returns true for current JRE version, throws AssertionError otherwise abstract Unit
assertVersionAtLeast(Integer minVersion)
Does nothing if current JRE version is higher or equal than minVersion, throws AssertionError otherwise abstract Unit
assertVersionInRange(Integer minVersion, Integer maxVersion)
Does nothing if current JRE version is between minVersion and maxVersion, throws AssertionError otherwise abstract String
getVersion()
JRE version, i.e. abstract Integer
getVersionAsInt()
JRE version as integer, i.e. -
-
Method Detail
-
assertVersion
abstract Unit assertVersion(String message, Function1<Integer, Boolean> condition)
Does nothing if condition returns true for current JRE version, throws AssertionError otherwise
- Parameters:
message
- Exception messagecondition
- Condition to check
-
assertVersionAtLeast
abstract Unit assertVersionAtLeast(Integer minVersion)
Does nothing if current JRE version is higher or equal than minVersion, throws AssertionError otherwise
- Parameters:
minVersion
- Minimal accepted version
-
assertVersionInRange
abstract Unit assertVersionInRange(Integer minVersion, Integer maxVersion)
Does nothing if current JRE version is between minVersion and maxVersion, throws AssertionError otherwise
- Parameters:
minVersion
- Minimal accepted versionmaxVersion
- Maximal accepted version
-
getVersion
abstract String getVersion()
JRE version, i.e. "1.8" or "11"
-
getVersionAsInt
abstract Integer getVersionAsInt()
JRE version as integer, i.e. 8 or 11
-
-
-
-