Record Class ArtifactRef.ResolvedArtifactRef
java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.mods.ArtifactRef.ResolvedArtifactRef
- All Implemented Interfaces:
ArtifactRef
- Enclosing interface:
ArtifactRef
public static record ArtifactRef.ResolvedArtifactRef(org.gradle.api.artifacts.ResolvedArtifact artifact, @Nullable Path sources)
extends Record
implements ArtifactRef
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.fabricmc.loom.configuration.mods.ArtifactRef
ArtifactRef.FileArtifactRef, ArtifactRef.ResolvedArtifactRef -
Constructor Summary
ConstructorsConstructorDescriptionResolvedArtifactRef(org.gradle.api.artifacts.ResolvedArtifact artifact, @Nullable Path sources) Creates an instance of aResolvedArtifactRefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyToConfiguration(org.gradle.api.Project project, org.gradle.api.NamedDomainObjectProvider<? extends org.gradle.api.artifacts.Configuration> configuration) org.gradle.api.artifacts.ResolvedArtifactartifact()Returns the value of theartifactrecord component.final booleanIndicates whether some other object is "equal to" this one.group()final inthashCode()Returns a hash code value for this object.name()path()@Nullable Pathsources()Returns the value of thesourcesrecord component.final StringtoString()Returns a string representation of this record class.version()
-
Constructor Details
-
ResolvedArtifactRef
public ResolvedArtifactRef(org.gradle.api.artifacts.ResolvedArtifact artifact, @Nullable Path sources) Creates an instance of aResolvedArtifactRefrecord class.- Parameters:
artifact- the value for theartifactrecord componentsources- the value for thesourcesrecord component
-
-
Method Details
-
path
- Specified by:
pathin interfaceArtifactRef
-
group
- Specified by:
groupin interfaceArtifactRef
-
name
- Specified by:
namein interfaceArtifactRef
-
version
- Specified by:
versionin interfaceArtifactRef
-
classifier
- Specified by:
classifierin interfaceArtifactRef
-
applyToConfiguration
public void applyToConfiguration(org.gradle.api.Project project, org.gradle.api.NamedDomainObjectProvider<? extends org.gradle.api.artifacts.Configuration> configuration) - Specified by:
applyToConfigurationin interfaceArtifactRef
-
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). -
artifact
public org.gradle.api.artifacts.ResolvedArtifact artifact()Returns the value of theartifactrecord component.- Returns:
- the value of the
artifactrecord component
-
sources
Returns the value of thesourcesrecord component.- Specified by:
sourcesin interfaceArtifactRef- Returns:
- the value of the
sourcesrecord component
-