Record Class VersionManifest

java.lang.Object
java.lang.Record
net.javasauce.ss.util.VersionManifest

public record VersionManifest(@Nullable VersionManifest.Arguments arguments, @Nullable Map<String,VersionManifest.Download> downloads, @Nullable String id, VersionManifest.McJavaVersion javaVersion, @Nullable List<VersionManifest.Library> libraries, @Nullable VersionManifest.Logging logging, @Nullable String mainClass, @Nullable String minecraftArguments, int minimumLauncherVersion, @Nullable Date time, @Nullable Date releaseTime, @Nullable String type, @Nullable String inheritsFrom) extends Record
Created by covers1624 on 25/10/24.
  • Constructor Details

    • VersionManifest

      public VersionManifest(@Nullable @Nullable VersionManifest.Arguments arguments, @Nullable @Nullable Map<String,VersionManifest.Download> downloads, @Nullable @Nullable String id, @Nullable VersionManifest.McJavaVersion javaVersion, @Nullable @Nullable List<VersionManifest.Library> libraries, @Nullable @Nullable VersionManifest.Logging logging, @Nullable @Nullable String mainClass, @Nullable @Nullable String minecraftArguments, int minimumLauncherVersion, @Nullable @Nullable Date time, @Nullable @Nullable Date releaseTime, @Nullable @Nullable String type, @Nullable @Nullable String inheritsFrom)
      Creates an instance of a VersionManifest record class.
      Parameters:
      arguments - the value for the arguments record component
      downloads - the value for the downloads record component
      id - the value for the id record component
      javaVersion - the value for the javaVersion record component
      libraries - the value for the libraries record component
      logging - the value for the logging record component
      mainClass - the value for the mainClass record component
      minecraftArguments - the value for the minecraftArguments record component
      minimumLauncherVersion - the value for the minimumLauncherVersion record component
      time - the value for the time record component
      releaseTime - the value for the releaseTime record component
      type - the value for the type record component
      inheritsFrom - the value for the inheritsFrom record component
  • Method Details

    • loadFrom

      public static VersionManifest loadFrom(Path file) throws IOException
      Throws:
      IOException
    • pathForId

      public static Path pathForId(Path versionsDir, String id)
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • computeJavaVersion

      public net.covers1624.jdkutils.JavaVersion computeJavaVersion()
    • computeBranchName

      public String computeBranchName()
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • downloads

      public Map<String,VersionManifest.Download> downloads()
      Returns the value of the downloads record component.
      Returns:
      the value of the downloads record component
    • libraries

      public List<VersionManifest.Library> libraries()
      Returns the value of the libraries record component.
      Returns:
      the value of the libraries record component
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • arguments

      @Nullable public @Nullable VersionManifest.Arguments arguments()
      Returns the value of the arguments record component.
      Returns:
      the value of the arguments record component
    • javaVersion

      @Nullable public VersionManifest.McJavaVersion javaVersion()
      Returns the value of the javaVersion record component.
      Returns:
      the value of the javaVersion record component
    • logging

      @Nullable public @Nullable VersionManifest.Logging logging()
      Returns the value of the logging record component.
      Returns:
      the value of the logging record component
    • mainClass

      @Nullable public @Nullable String mainClass()
      Returns the value of the mainClass record component.
      Returns:
      the value of the mainClass record component
    • minecraftArguments

      @Nullable public @Nullable String minecraftArguments()
      Returns the value of the minecraftArguments record component.
      Returns:
      the value of the minecraftArguments record component
    • minimumLauncherVersion

      public int minimumLauncherVersion()
      Returns the value of the minimumLauncherVersion record component.
      Returns:
      the value of the minimumLauncherVersion record component
    • time

      @Nullable public @Nullable Date time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • releaseTime

      @Nullable public @Nullable Date releaseTime()
      Returns the value of the releaseTime record component.
      Returns:
      the value of the releaseTime record component
    • inheritsFrom

      @Nullable public @Nullable String inheritsFrom()
      Returns the value of the inheritsFrom record component.
      Returns:
      the value of the inheritsFrom record component