Class LegacyFabricInstaller
-
- All Implemented Interfaces:
public final class LegacyFabricInstallerInformation about the LegacyFabric installer and versions.
Griefed
-
-
Field Summary
Fields Modifier and Type Field Description private final List<String>allVersionsprivate final StringinstallerUrlTemplateprivate final Stringlatestprivate final Stringrelease
-
Constructor Summary
Constructors Constructor Description LegacyFabricInstaller(File installerManifest, Utilities utilities)
-
Method Summary
Modifier and Type Method Description final List<String>getAllVersions()Every LegacyFabric installer version, newest first. final StringgetInstallerUrlTemplate()URL template the installer download is built from, with the version substituted in. final StringgetLatest()Newest installer version the manifest advertises, or nullbefore the manifest has been read.final StringgetRelease()Newest stable installer version, or nullbefore the manifest has been read.final Unitupdate()Update all lists of available versions with new information gathered from the manifest. final URLlatestURL()The URL to the latest installer for Legacy Fabric. final URLreleaseURL()The URL to the release installer for Legacy Fabric. final Optional<URL>specificURL(String version)Get the URL for a specific installer version, wrapped in an Optional. -
-
Method Detail
-
getAllVersions
final List<String> getAllVersions()
Every LegacyFabric installer version, newest first. A separate series from the loader versions.
Published as an immutable snapshot behind
@Volatile, not as a collection update mutates in place. The refresh runs on a background coroutine while callers read; clearing and refilling a shared list let a reader throwConcurrentModificationExceptionor silently observe the empty window between the two.
-
getInstallerUrlTemplate
final String getInstallerUrlTemplate()
URL template the installer download is built from, with the version substituted in.
-
getLatest
final String getLatest()
Newest installer version the manifest advertises, or
nullbefore the manifest has been read.
-
getRelease
final String getRelease()
Newest stable installer version, or
nullbefore the manifest has been read.
-
update
final Unit update()
Update all lists of available versions with new information gathered from the manifest.
-
latestURL
final URL latestURL()
The URL to the latest installer for Legacy Fabric.
- Returns:
URL to the latest installer for Legacy Fabric.
-
releaseURL
final URL releaseURL()
The URL to the release installer for Legacy Fabric.
- Returns:
URL to the release installer for Legacy Fabric.
-
specificURL
final Optional<URL> specificURL(String version)
Get the URL for a specific installer version, wrapped in an Optional.
- Parameters:
version- The version of the installer for which to get the URL.- Returns:
URL to the installer, for the specified version, wrapped in an Optional.
-
-
-
-