Package com.diffplug.spotless
Class Jvm
- java.lang.Object
-
- com.diffplug.spotless.Jvm
-
public final class Jvm extends Object
Java virtual machine helper
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Jvm.Support<V>
Utility to map constraints of formatter to this JVM
-
Constructor Summary
Constructors Constructor Description Jvm()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <V> Jvm.Support<V>
support(String formatterName)
Creates a map of JVM requirements for a formatterstatic int
version()
-
-
-
Method Detail
-
version
public static int version()
- Returns:
- the major version of this VM, e.g. 8, 9, 10, 11, 13, etc.
-
support
public static <V> Jvm.Support<V> support(String formatterName)
Creates a map of JVM requirements for a formatter- Type Parameters:
V
- Version type of the formatter (V#toString() must correspond to a semantic version, separated by dots)- Parameters:
formatterName
- Name of the formatter- Returns:
- Empty map of supported formatters
-
-