Record Class AbstractModLocator.DefaultModFileInfo

java.lang.Object
java.lang.Record
net.minecraftforge.fml.loading.moddiscovery.AbstractModLocator.DefaultModFileInfo
All Implemented Interfaces:
net.minecraftforge.forgespi.language.IConfigurable, net.minecraftforge.forgespi.language.IModFileInfo
Enclosing class:
AbstractModLocator

private static record AbstractModLocator.DefaultModFileInfo(net.minecraftforge.forgespi.locating.IModFile mod, String license, net.minecraftforge.forgespi.language.IConfigurable configurable) extends Record implements net.minecraftforge.forgespi.language.IModFileInfo, net.minecraftforge.forgespi.language.IConfigurable
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraftforge.forgespi.language.IModFileInfo

    net.minecraftforge.forgespi.language.IModFileInfo.LanguageSpec
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final net.minecraftforge.forgespi.language.IConfigurable
    The field for the configurable record component.
    private final String
    The field for the license record component.
    private final net.minecraftforge.forgespi.locating.IModFile
    The field for the mod record component.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    DefaultModFileInfo(net.minecraftforge.forgespi.locating.IModFile mod, String license, net.minecraftforge.forgespi.language.IConfigurable configurable)
    Creates an instance of a DefaultModFileInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraftforge.forgespi.language.IConfigurable
    Returns the value of the configurable record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    net.minecraftforge.forgespi.language.IConfigurable
     
    <T> Optional<T>
     
    List<? extends net.minecraftforge.forgespi.language.IConfigurable>
    getConfigList(String... strings)
     
    net.minecraftforge.forgespi.locating.IModFile
     
     
     
    List<net.minecraftforge.forgespi.language.IModInfo>
     
    final int
    Returns a hash code value for this object.
    Returns the value of the license record component.
    net.minecraftforge.forgespi.locating.IModFile
    mod()
    Returns the value of the mod record component.
     
    List<net.minecraftforge.forgespi.language.IModFileInfo.LanguageSpec>
     
    boolean
     
    Returns a string representation of this record class.
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • mod

      private final net.minecraftforge.forgespi.locating.IModFile mod
      The field for the mod record component.
    • license

      private final String license
      The field for the license record component.
    • configurable

      private final net.minecraftforge.forgespi.language.IConfigurable configurable
      The field for the configurable record component.
  • Constructor Details

    • DefaultModFileInfo

      private DefaultModFileInfo(net.minecraftforge.forgespi.locating.IModFile mod, String license, net.minecraftforge.forgespi.language.IConfigurable configurable)
      Creates an instance of a DefaultModFileInfo record class.
      Parameters:
      mod - the value for the mod record component
      license - the value for the license record component
      configurable - the value for the configurable record component
  • Method Details

    • getConfigElement

      public <T> Optional<T> getConfigElement(String... strings)
      Specified by:
      getConfigElement in interface net.minecraftforge.forgespi.language.IConfigurable
    • getConfigList

      public List<? extends net.minecraftforge.forgespi.language.IConfigurable> getConfigList(String... strings)
      Specified by:
      getConfigList in interface net.minecraftforge.forgespi.language.IConfigurable
    • getMods

      public List<net.minecraftforge.forgespi.language.IModInfo> getMods()
      Specified by:
      getMods in interface net.minecraftforge.forgespi.language.IModFileInfo
    • requiredLanguageLoaders

      public List<net.minecraftforge.forgespi.language.IModFileInfo.LanguageSpec> requiredLanguageLoaders()
      Specified by:
      requiredLanguageLoaders in interface net.minecraftforge.forgespi.language.IModFileInfo
    • showAsResourcePack

      public boolean showAsResourcePack()
      Specified by:
      showAsResourcePack in interface net.minecraftforge.forgespi.language.IModFileInfo
    • getFileProperties

      public Map<String,Object> getFileProperties()
      Specified by:
      getFileProperties in interface net.minecraftforge.forgespi.language.IModFileInfo
    • getLicense

      public String getLicense()
      Specified by:
      getLicense in interface net.minecraftforge.forgespi.language.IModFileInfo
    • getFile

      public net.minecraftforge.forgespi.locating.IModFile getFile()
      Specified by:
      getFile in interface net.minecraftforge.forgespi.language.IModFileInfo
    • getConfig

      public net.minecraftforge.forgespi.language.IConfigurable getConfig()
      Specified by:
      getConfig in interface net.minecraftforge.forgespi.language.IModFileInfo
    • moduleName

      public String moduleName()
      Specified by:
      moduleName in interface net.minecraftforge.forgespi.language.IModFileInfo
    • versionString

      public String versionString()
      Specified by:
      versionString in interface net.minecraftforge.forgespi.language.IModFileInfo
    • usesServices

      public List<String> usesServices()
      Specified by:
      usesServices in interface net.minecraftforge.forgespi.language.IModFileInfo
    • toString

      public String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • mod

      public net.minecraftforge.forgespi.locating.IModFile mod()
      Returns the value of the mod record component.
      Returns:
      the value of the mod record component
    • license

      public String license()
      Returns the value of the license record component.
      Returns:
      the value of the license record component
    • configurable

      public net.minecraftforge.forgespi.language.IConfigurable configurable()
      Returns the value of the configurable record component.
      Returns:
      the value of the configurable record component