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 ModFileDiscoveryAttributes
private final @Nullable IDependencyLocator
The field for thedependencyLocator
record component.private final @Nullable IModFileCandidateLocator
The field for thelocator
record component.private final @Nullable IModFile
The field for theparent
record component.private final @Nullable IModFileReader
The field for thereader
record component. -
Constructor Summary
ConstructorsConstructorDescriptionModFileDiscoveryAttributes
(@Nullable IModFile parent, @Nullable IModFileReader reader, @Nullable IModFileCandidateLocator locator, @Nullable IDependencyLocator dependencyLocator) Creates an instance of aModFileDiscoveryAttributes
record class. -
Method Summary
Modifier and TypeMethodDescription@Nullable IDependencyLocator
Returns the value of thedependencyLocator
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@Nullable IModFileCandidateLocator
locator()
Returns the value of thelocator
record component.merge
(ModFileDiscoveryAttributes attributes) @Nullable IModFile
parent()
Returns the value of theparent
record component.@Nullable IModFileReader
reader()
Returns the value of thereader
record 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 aModFileDiscoveryAttributes
record 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 theparent
record component.- Returns:
- the value of the
parent
record component
-
reader
Returns the value of thereader
record component.- Returns:
- the value of the
reader
record component
-
locator
Returns the value of thelocator
record component.- Returns:
- the value of the
locator
record component
-
dependencyLocator
Returns the value of thedependencyLocator
record component.- Returns:
- the value of the
dependencyLocator
record component
-