-
public interface JREInfoProviderProvides information about used Java runtime
-
-
Method Summary
Modifier and Type Method Description abstract UnitassertVersion(String message, Function1<Integer, Boolean> condition)Does nothing if condition returns true for current JRE version, throws AssertionError otherwise abstract UnitassertVersionAtLeast(Integer minVersion)Does nothing if current JRE version is higher or equal than minVersion, throws AssertionError otherwise abstract UnitassertVersionInRange(Integer minVersion, Integer maxVersion)Does nothing if current JRE version is between minVersion and maxVersion, throws AssertionError otherwise abstract StringgetVersion()JRE version, i.e. abstract IntegergetVersionAsInt()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
-
-
-
-