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 String
The field for theartifactId
record component.private final String
The field for theclassifier
record component.private final String
The field for theextension
record component.private final String
The field for thegroupId
record component.private final String
The field for theversion
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theartifactId
record component.Returns the value of theclassifier
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theextension
record component.groupId()
Returns the value of thegroupId
record component.final int
hashCode()
Returns a hash code value for this object.static MavenCoordinate
Valid forms:groupId:artifactId:version
groupId:artifactId:version:classifier
groupId:artifactId:version:classifier@extension
groupId:artifactId:version@extension
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.version()
Returns the value of theversion
record component.
-
Field Details
-
groupId
The field for thegroupId
record component. -
artifactId
The field for theartifactId
record component. -
extension
The field for theextension
record component. -
classifier
The field for theclassifier
record component. -
version
The field for theversion
record component.
-
-
Constructor Details
-
MavenCoordinate
public MavenCoordinate(String groupId, String artifactId, String extension, String classifier, String version) Creates an instance of aMavenCoordinate
record class.- Parameters:
groupId
- the value for thegroupId
record componentartifactId
- the value for theartifactId
record componentextension
- the value for theextension
record componentclassifier
- the value for theclassifier
record componentversion
- the value for theversion
record component
-
-
Method Details
-
parse
Valid forms:groupId:artifactId:version
groupId:artifactId:version:classifier
groupId:artifactId:version:classifier@extension
groupId: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 thegroupId
record component.- Returns:
- the value of the
groupId
record component
-
artifactId
Returns the value of theartifactId
record component.- Returns:
- the value of the
artifactId
record component
-
extension
Returns the value of theextension
record component.- Returns:
- the value of the
extension
record component
-
classifier
Returns the value of theclassifier
record component.- Returns:
- the value of the
classifier
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-