Package net.neoforged.fml.loading
Record Class MavenCoordinate
java.lang.Object
java.lang.Record
net.neoforged.fml.loading.MavenCoordinate
public record MavenCoordinate(String groupId, String artifactId, String extension, String classifier, String version)
extends Record
Models the Maven coordinates for an artifact.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theartifactIdrecord component.private final StringThe field for theclassifierrecord component.private final StringThe field for theextensionrecord component.private final StringThe field for thegroupIdrecord component.private final StringThe field for theversionrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theartifactIdrecord component.Returns the value of theclassifierrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theextensionrecord component.groupId()Returns the value of thegroupIdrecord component.final inthashCode()Returns a hash code value for this object.static MavenCoordinateValid forms:groupId:artifactId:versiongroupId:artifactId:version:classifiergroupId:artifactId:version:classifier@extensiongroupId:artifactId:version@extensionConstructs a path relative to the root of a Maven repository pointing to the artifact expressed through these coordinates.toString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Field Details
-
groupId
The field for thegroupIdrecord component. -
artifactId
The field for theartifactIdrecord component. -
extension
The field for theextensionrecord component. -
classifier
The field for theclassifierrecord component. -
version
The field for theversionrecord component.
-
-
Constructor Details
-
MavenCoordinate
public MavenCoordinate(String groupId, String artifactId, String extension, String classifier, String version) Creates an instance of aMavenCoordinaterecord class.- Parameters:
groupId- the value for thegroupIdrecord componentartifactId- the value for theartifactIdrecord componentextension- the value for theextensionrecord componentclassifier- the value for theclassifierrecord componentversion- the value for theversionrecord component
-
-
Method Details
-
parse
Valid forms:groupId:artifactId:versiongroupId:artifactId:version:classifiergroupId:artifactId:version:classifier@extensiongroupId:artifactId:version@extension
-
toRelativeRepositoryPath
Constructs a path relative to the root of a Maven repository pointing to the artifact expressed through these coordinates. -
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. -
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. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
groupId
Returns the value of thegroupIdrecord component.- Returns:
- the value of the
groupIdrecord component
-
artifactId
Returns the value of theartifactIdrecord component.- Returns:
- the value of the
artifactIdrecord component
-
extension
Returns the value of theextensionrecord component.- Returns:
- the value of the
extensionrecord component
-
classifier
Returns the value of theclassifierrecord component.- Returns:
- the value of the
classifierrecord component
-
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-