public class Library extends Object implements Comparable<Library>
Constructor and Description |
---|
Library(String groupId,
String artifactId,
String version)
Creates a
Library instance with the specified group ID, artifact ID, and version. |
Library(@NonNls String groupId,
@NonNls String artifactId,
@NonNls String version,
LibraryManager.HashAlgorithm checksumType,
@NonNls String checksumValue)
Creates a
Library instance with the specified group ID, artifact ID, version, and
checksum. |
Library(String groupId,
String artifactId,
String version,
String repository)
Creates a
Library instance with the specified group ID, artifact ID, version, and
repository. |
Library(String groupId,
String artifactId,
String version,
String repository,
LibraryManager.HashAlgorithm checksumType,
String checksumValue,
boolean excludeDependencies)
Creates a
Library instance with the specified group ID, artifact ID, version,
repository, and checksum. |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Library o) |
boolean |
equals(Object o) |
static Library |
fromConfigMap(Map<?,?> configMap)
Extracts the needed information from a map of key-value pairs inside a config file to
download a
Library and inject it at runtime. |
String |
getArtifactId()
Returns the artifact ID of this library.
|
LibraryManager.HashAlgorithm |
getChecksumType()
The algorithm used to generate the checksum for this library, if one was specified.
|
String |
getChecksumValue()
The checksum itself, validated against the library to make sure the library is intact.
|
String |
getGroupId()
Returns the group ID of this library.
|
LibraryKey |
getLibraryKey()
The group ID of the library in a maven-style repo.
|
String |
getRepository()
The optional URL for this library, for use in cases where the library is not part of the
default Maven repo.
|
String |
getVersion()
The version number of the library in a maven-style repo.
|
int |
hashCode() |
boolean |
isExcludeDependencies()
Excludes the dependency from any dependency checks.
|
Map<?,?> |
toConfigMap()
Converts the
Library instance to a map that can be serialized and saved into a
config file. |
String |
toString() |
public Library(String groupId, String artifactId, String version)
Library
instance with the specified group ID, artifact ID, and version.groupId
- The group ID of the library, separated by periods.artifactId
- The artifact ID of the library.version
- The version of the library.public Library(String groupId, String artifactId, String version, String repository)
Library
instance with the specified group ID, artifact ID, version, and
repository.groupId
- The group ID of the library, separated by periods.artifactId
- The artifact ID of the library.version
- The version of the library.repository
- The URL of the library's repository.public Library(@NonNls @NonNls String groupId, @NonNls @NonNls String artifactId, @NonNls @NonNls String version, LibraryManager.HashAlgorithm checksumType, @NonNls @NonNls String checksumValue)
Library
instance with the specified group ID, artifact ID, version, and
checksum.groupId
- The group ID of the library, separated by periods.artifactId
- The artifact ID of the library.version
- The version of the library.checksumType
- The type of hash the checksum is using.checksumValue
- The checksum to validate the downloaded library against.public Library(String groupId, String artifactId, String version, String repository, LibraryManager.HashAlgorithm checksumType, String checksumValue, boolean excludeDependencies)
Library
instance with the specified group ID, artifact ID, version,
repository, and checksum.groupId
- The group ID of the library, separated by periods.artifactId
- The artifact ID of the library.version
- The version of the library.repository
- The URL of the library's repository.checksumType
- The type of hash the checksum is using.checksumValue
- The checksum to validate the downloaded library against.excludeDependencies
- Specifies that dependencies may be excluded.public static Library fromConfigMap(Map<?,?> configMap)
Library
and inject it at runtime.configMap
- The Map that was extracted from a config file.Library
instance populated with whatever information we could extract.public Map<?,?> toConfigMap()
Library
instance to a map that can be serialized and saved into a
config file.public String getGroupId()
public String getArtifactId()
public int compareTo(Library o)
compareTo
in interface Comparable<Library>
public LibraryKey getLibraryKey()
public String getVersion()
public String getRepository()
public LibraryManager.HashAlgorithm getChecksumType()
public String getChecksumValue()
public boolean isExcludeDependencies()
Copyright © 2021. All rights reserved.