Record Class JdkSpec
java.lang.Object
java.lang.Record
com.dua3.gradle.jdkprovider.types.JdkSpec
- Record Components:
os- the operating system family for the JDKarch- the system architecture for the JDKversion- the version specification for the JDKvendor- the vendor specification for the JDKnativeImageCapable- whether the JDK supports native image compilationjavaFxBundled- whether the JDK has JavaFX bundled
@NullMarked
public record JdkSpec(OSFamily os, SystemArchitecture arch, Runtime.Version version, String vendor, boolean nativeImageCapable, boolean javaFxBundled)
extends Record
Represents specifications for a JDK.
Note: Default values for `os`, `arch`, and `version` are resolved to the current system's operating system, architecture, and version when not explicitly specified during construction.
-
Constructor Summary
ConstructorsConstructorDescriptionJdkSpec(OSFamily os, SystemArchitecture arch, Runtime.Version version, String vendor, boolean nativeImageCapable, boolean javaFxBundled) Creates an instance of aJdkSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionarch()Returns the value of thearchrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thejavaFxBundledrecord component.booleanReturns the value of thenativeImageCapablerecord component.os()Returns the value of theosrecord component.toString()Generates a string representation of theJdkSpecobject detailing its characteristics, including version specification, operating system, architecture, vendor, native image capability, and whether JavaFX is bundled.vendor()Returns the value of thevendorrecord component.version()Returns the value of theversionrecord component.
-
Constructor Details
-
JdkSpec
public JdkSpec(OSFamily os, SystemArchitecture arch, Runtime.Version version, String vendor, boolean nativeImageCapable, boolean javaFxBundled) Creates an instance of aJdkSpecrecord class.- Parameters:
os- the value for theosrecord componentarch- the value for thearchrecord componentversion- the value for theversionrecord componentvendor- the value for thevendorrecord componentnativeImageCapable- the value for thenativeImageCapablerecord componentjavaFxBundled- the value for thejavaFxBundledrecord component
-
-
Method Details
-
toString
Generates a string representation of theJdkSpecobject detailing its characteristics, including version specification, operating system, architecture, vendor, native image capability, and whether JavaFX is bundled. Each attribute is included in the resulting string, separating individual components with a dash ('-').Note: The string representation was chosen in a format that can be used as a filename.
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
os
Returns the value of theosrecord component.- Returns:
- the value of the
osrecord component
-
arch
Returns the value of thearchrecord component.- Returns:
- the value of the
archrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
vendor
Returns the value of thevendorrecord component.- Returns:
- the value of the
vendorrecord component
-
nativeImageCapable
public boolean nativeImageCapable()Returns the value of thenativeImageCapablerecord component.- Returns:
- the value of the
nativeImageCapablerecord component
-
javaFxBundled
public boolean javaFxBundled()Returns the value of thejavaFxBundledrecord component.- Returns:
- the value of the
javaFxBundledrecord component
-