Package devs.beer.nativepackets.api
Record Class PlatformDescriptor
java.lang.Object
java.lang.Record
devs.beer.nativepackets.api.PlatformDescriptor
- Record Components:
platform- public platform informationcapabilities- verified optional capabilitiesruntimeMappings- expected adapter mapping namespacejavaVersion- active Java feature versionbukkitName- Bukkit implementation name used for diagnostics onlybukkitVersion- full Bukkit version used for diagnostics only
public record PlatformDescriptor(PlatformInfo platform, PlatformCapabilities capabilities, MappingNamespace runtimeMappings, int javaVersion, String bukkitName, String bukkitVersion)
extends Record
Deterministic startup description used for exact adapter selection.
-
Constructor Summary
ConstructorsConstructorDescriptionPlatformDescriptor(PlatformInfo platform, PlatformCapabilities capabilities, MappingNamespace runtimeMappings, int javaVersion, String bukkitName, String bukkitVersion) Creates an instance of aPlatformDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebukkitNamerecord component.Returns the value of thebukkitVersionrecord component.Returns the value of thecapabilitiesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thejavaVersionrecord component.platform()Returns the value of theplatformrecord component.Returns the value of theruntimeMappingsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PlatformDescriptor
public PlatformDescriptor(PlatformInfo platform, PlatformCapabilities capabilities, MappingNamespace runtimeMappings, int javaVersion, String bukkitName, String bukkitVersion) Creates an instance of aPlatformDescriptorrecord class.- Parameters:
platform- the value for theplatformrecord componentcapabilities- the value for thecapabilitiesrecord componentruntimeMappings- the value for theruntimeMappingsrecord componentjavaVersion- the value for thejavaVersionrecord componentbukkitName- the value for thebukkitNamerecord componentbukkitVersion- the value for thebukkitVersionrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
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 '=='. -
platform
Returns the value of theplatformrecord component.- Returns:
- the value of the
platformrecord component
-
capabilities
Returns the value of thecapabilitiesrecord component.- Returns:
- the value of the
capabilitiesrecord component
-
runtimeMappings
Returns the value of theruntimeMappingsrecord component.- Returns:
- the value of the
runtimeMappingsrecord component
-
javaVersion
public int javaVersion()Returns the value of thejavaVersionrecord component.- Returns:
- the value of the
javaVersionrecord component
-
bukkitName
Returns the value of thebukkitNamerecord component.- Returns:
- the value of the
bukkitNamerecord component
-
bukkitVersion
Returns the value of thebukkitVersionrecord component.- Returns:
- the value of the
bukkitVersionrecord component
-