Comparable<LibraryReference>, RuleControlledResourcepublic class LibraryReference extends AbstractRuleControlledResource implements Comparable<LibraryReference>
| Modifier and Type | Class | Description |
|---|---|---|
static class |
LibraryReference.DownloadMap |
Provides a map of downloadable artifacts along with their classifiers.
|
static class |
LibraryReference.ExtractionConfiguration |
Represents an extraction configuration which identifies whether and how a library is to be
extracted.
|
| Modifier | Constructor | Description |
|---|---|---|
|
LibraryReference(String name,
LibraryArtifact linuxNativesArtifact,
LibraryArtifact macNativesArtifact,
LibraryArtifact windowsNativesArtifact,
LibraryReference.DownloadMap downloads,
LibraryReference.ExtractionConfiguration extractionConfiguration,
Set<Rule> rules) |
|
protected |
LibraryReference(String name,
LibraryReference.DownloadMap downloads,
Map<String,String> classifierMap,
LibraryReference.ExtractionConfiguration extractionConfiguration,
Set<Rule> rules) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
calculatePriority() |
Calculates the priority of this reference.
|
int |
compareTo(LibraryReference libraryReference) |
|
boolean |
equals(Object o) |
|
LibraryReference.DownloadMap |
getDownloads() |
Retrieves a map of downloadable artifacts.
|
Optional<LibraryReference.ExtractionConfiguration> |
getExtractionConfiguration() |
Retrieves an extraction config which identifies whether and how the artifact is to be
extracted.
|
Optional<LibraryArtifact> |
getLinuxNativesArtifact() |
Retrieves the artifact which contains the Linux natives for this particular library.
|
Optional<LibraryArtifact> |
getMacNativesArtifact() |
Retrieves the artifact which contains the Mac OS natives for this particular library.
|
String |
getName() |
Retrieves the identifier for this library reference (typically similarly formatted to a maven
coordinate).
|
Optional<LibraryArtifact> |
getWindowsNativesArtifact() |
Retrieves the artifact which contains the Windows natives for this particular library.
|
int |
hashCode() |
evaluate, getRulespublic LibraryReference(@NonNull
String name,
@Nullable
LibraryArtifact linuxNativesArtifact,
@Nullable
LibraryArtifact macNativesArtifact,
@Nullable
LibraryArtifact windowsNativesArtifact,
@NonNull
LibraryReference.DownloadMap downloads,
@Nullable
LibraryReference.ExtractionConfiguration extractionConfiguration,
@Nullable
Set<Rule> rules)
protected LibraryReference(@NonNull
String name,
@NonNull
LibraryReference.DownloadMap downloads,
@Nullable
Map<String,String> classifierMap,
@Nullable
LibraryReference.ExtractionConfiguration extractionConfiguration,
@Nullable
Set<Rule> rules)
public int calculatePriority()
Calculates the priority of this reference.
This method effectively identifies the definition precision of a library reference in order to evaluate which of two or more possible elements to choose in order to get the most information when a duplicate exists.
While these duplicates typically occur in their correct order (probably due to the fact that older launcher versions will discord library versions they do not know how to deal with), we're still comparing them according to this method to avoid future issues.
public int compareTo(@NonNull
LibraryReference libraryReference)
compareTo in interface Comparable<LibraryReference>@NonNull public String getName()
@NonNull public Optional<LibraryArtifact> getLinuxNativesArtifact()
@NonNull public Optional<LibraryArtifact> getMacNativesArtifact()
@NonNull public Optional<LibraryArtifact> getWindowsNativesArtifact()
@NonNull public LibraryReference.DownloadMap getDownloads()
@NonNull public Optional<LibraryReference.ExtractionConfiguration> getExtractionConfiguration()
public boolean equals(Object o)
equals in class AbstractRuleControlledResourcepublic int hashCode()
hashCode in class AbstractRuleControlledResourceCopyright © 2018 Basin. All rights reserved.