Record Class ModFileDiscoveryAttributes
java.lang.Object
java.lang.Record
net.neoforged.neoforgespi.locating.ModFileDiscoveryAttributes
- Record Components:
parent- The mod file that logically contains this mod file.reader- The reader that was used to get a mod-file from jar contents. May be null if the mod file was directly created by a locator.
public record ModFileDiscoveryAttributes(@Nullable IModFile parent, @Nullable IModFileReader reader, @Nullable IModFileCandidateLocator locator, @Nullable IDependencyLocator dependencyLocator)
extends Record
Attributes of a modfile relating to how it was discovered.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModFileDiscoveryAttributesprivate final @Nullable IDependencyLocatorThe field for thedependencyLocatorrecord component.private final @Nullable IModFileCandidateLocatorThe field for thelocatorrecord component.private final @Nullable IModFileThe field for theparentrecord component.private final @Nullable IModFileReaderThe field for thereaderrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionModFileDiscoveryAttributes(@Nullable IModFile parent, @Nullable IModFileReader reader, @Nullable IModFileCandidateLocator locator, @Nullable IDependencyLocator dependencyLocator) Creates an instance of aModFileDiscoveryAttributesrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable IDependencyLocatorReturns the value of thedependencyLocatorrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable IModFileCandidateLocatorlocator()Returns the value of thelocatorrecord component.merge(ModFileDiscoveryAttributes attributes) @Nullable IModFileparent()Returns the value of theparentrecord component.@Nullable IModFileReaderreader()Returns the value of thereaderrecord component.toString()Returns a string representation of this record class.withDependencyLocator(IDependencyLocator dependencyLocator) withLocator(IModFileCandidateLocator locator) withParent(IModFile parent) withReader(IModFileReader reader)
-
Field Details
-
Constructor Details
-
ModFileDiscoveryAttributes
public ModFileDiscoveryAttributes(@Nullable @Nullable IModFile parent, @Nullable @Nullable IModFileReader reader, @Nullable @Nullable IModFileCandidateLocator locator, @Nullable @Nullable IDependencyLocator dependencyLocator) Creates an instance of aModFileDiscoveryAttributesrecord class.
-
-
Method Details
-
withParent
-
withReader
-
withLocator
-
withDependencyLocator
-
merge
-
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). -
parent
Returns the value of theparentrecord component.- Returns:
- the value of the
parentrecord component
-
reader
Returns the value of thereaderrecord component.- Returns:
- the value of the
readerrecord component
-
locator
Returns the value of thelocatorrecord component.- Returns:
- the value of the
locatorrecord component
-
dependencyLocator
Returns the value of thedependencyLocatorrecord component.- Returns:
- the value of the
dependencyLocatorrecord component
-