Class JavaRuntimeRelease

java.lang.Object
dev.treset.mcdl.json.GenericJsonParsable
dev.treset.mcdl.java.JavaRuntimeRelease
All Implemented Interfaces:
dev.treset.mcdl.json.JsonParsable

public class JavaRuntimeRelease extends dev.treset.mcdl.json.GenericJsonParsable
  • Constructor Details

  • Method Details

    • fromJson

      public static Map<String,Map<String,List<JavaRuntimeRelease>>> fromJson(String json) throws dev.treset.mcdl.json.SerializationException
      Throws:
      dev.treset.mcdl.json.SerializationException
    • fromJsonObject

      public static JavaRuntimeRelease fromJsonObject(com.google.gson.JsonObject json, String id) throws dev.treset.mcdl.json.SerializationException
      Throws:
      dev.treset.mcdl.json.SerializationException
    • getFiles

      public List<JavaFile> getFiles() throws dev.treset.mcdl.exception.FileDownloadException
      Gets all the files for this java release
      Returns:
      A list of java files
      Throws:
      dev.treset.mcdl.exception.FileDownloadException - If there is an error downloading or parsing the files
    • downloadFiles

      public void downloadFiles(File baseDir, Consumer<dev.treset.mcdl.util.DownloadStatus> onStatus) throws dev.treset.mcdl.exception.FileDownloadException
      Downloads all the files for this java release to the specified directory
      Parameters:
      baseDir - The directory to download the files to
      onStatus - The status callback
      Throws:
      dev.treset.mcdl.exception.FileDownloadException - If there is an error downloading or writing a file
    • getAvailability

      public JavaRuntimeRelease.Availability getAvailability()
    • setAvailability

      public void setAvailability(JavaRuntimeRelease.Availability availability)
    • getManifest

      public JavaRuntimeRelease.Manifest getManifest()
    • setManifest

      public void setManifest(JavaRuntimeRelease.Manifest manifest)
    • getVersion

      public JavaRuntimeRelease.Version getVersion()
    • setVersion

      public void setVersion(JavaRuntimeRelease.Version version)