Class ModFile

  • All Implemented Interfaces:
    net.minecraftforge.forgespi.locating.IModFile

    public class ModFile
    extends java.lang.Object
    implements net.minecraftforge.forgespi.locating.IModFile
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface net.minecraftforge.forgespi.locating.IModFile

        net.minecraftforge.forgespi.locating.IModFile.Type
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.nio.file.Path accessTransformer  
      private java.util.List<CoreModFile> coreMods  
      private static java.util.jar.Manifest DEFAULTMANIFEST  
      private net.minecraftforge.forgespi.language.ModFileScanData fileModFileScanData  
      private java.nio.file.Path filePath  
      private java.util.Map<java.lang.String,​java.lang.Object> fileProperties  
      private java.util.concurrent.CompletableFuture<net.minecraftforge.forgespi.language.ModFileScanData> futureScanResult  
      private java.lang.String jarVersion  
      private net.minecraftforge.forgespi.language.IModLanguageProvider loader  
      private net.minecraftforge.forgespi.locating.IModLocator locator  
      private static org.apache.logging.log4j.Logger LOGGER  
      private java.util.jar.Manifest manifest  
      private net.minecraftforge.forgespi.language.IModFileInfo modFileInfo  
      private net.minecraftforge.forgespi.locating.IModFile.Type modFileType  
      private net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser  
      private java.lang.Throwable scanError  
      static java.util.jar.Attributes.Name TYPE  
    • Constructor Summary

      Constructors 
      Constructor Description
      ModFile​(java.nio.file.Path file, net.minecraftforge.forgespi.locating.IModLocator locator, net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static net.minecraftforge.forgespi.locating.ModFileFactory buildFactory()  
      net.minecraftforge.forgespi.language.ModFileScanData compileContent()
      Run in an executor thread to harvest the class and annotation list
      java.nio.file.Path findResource​(java.lang.String className)  
      java.util.Optional<java.nio.file.Path> getAccessTransformer()  
      java.util.List<CoreModFile> getCoreMods()  
      java.lang.String getFileName()  
      java.nio.file.Path getFilePath()  
      net.minecraftforge.forgespi.language.IModLanguageProvider getLoader()  
      net.minecraftforge.forgespi.locating.IModLocator getLocator()  
      net.minecraftforge.forgespi.language.IModFileInfo getModFileInfo()  
      java.util.List<net.minecraftforge.forgespi.language.IModInfo> getModInfos()  
      net.minecraftforge.forgespi.language.ModFileScanData getScanResult()  
      java.util.function.Supplier<java.util.Map<java.lang.String,​java.lang.Object>> getSubstitutionMap()  
      net.minecraftforge.forgespi.locating.IModFile.Type getType()  
      void identifyLanguage()  
      boolean identifyMods()  
      static ModFile newFMLInstance​(java.nio.file.Path path, net.minecraftforge.forgespi.locating.IModLocator locator)  
      void scanFile​(java.util.function.Consumer<java.nio.file.Path> pathConsumer)  
      void setFileProperties​(java.util.Map<java.lang.String,​java.lang.Object> fileProperties)  
      void setFutureScanResult​(java.util.concurrent.CompletableFuture<net.minecraftforge.forgespi.language.ModFileScanData> future)  
      void setScanResult​(net.minecraftforge.forgespi.language.ModFileScanData modFileScanData, java.lang.Throwable throwable)  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • DEFAULTMANIFEST

        private static final java.util.jar.Manifest DEFAULTMANIFEST
      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • jarVersion

        private final java.lang.String jarVersion
      • parser

        private final net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser
      • fileProperties

        private java.util.Map<java.lang.String,​java.lang.Object> fileProperties
      • loader

        private net.minecraftforge.forgespi.language.IModLanguageProvider loader
      • scanError

        private java.lang.Throwable scanError
      • filePath

        private final java.nio.file.Path filePath
      • modFileType

        private final net.minecraftforge.forgespi.locating.IModFile.Type modFileType
      • manifest

        private final java.util.jar.Manifest manifest
      • locator

        private final net.minecraftforge.forgespi.locating.IModLocator locator
      • modFileInfo

        private net.minecraftforge.forgespi.language.IModFileInfo modFileInfo
      • fileModFileScanData

        private net.minecraftforge.forgespi.language.ModFileScanData fileModFileScanData
      • futureScanResult

        private java.util.concurrent.CompletableFuture<net.minecraftforge.forgespi.language.ModFileScanData> futureScanResult
      • coreMods

        private java.util.List<CoreModFile> coreMods
      • accessTransformer

        private java.nio.file.Path accessTransformer
      • TYPE

        public static final java.util.jar.Attributes.Name TYPE
    • Constructor Detail

      • ModFile

        public ModFile​(java.nio.file.Path file,
                       net.minecraftforge.forgespi.locating.IModLocator locator,
                       net.minecraftforge.forgespi.locating.ModFileFactory.ModFileInfoParser parser)
    • Method Detail

      • getSubstitutionMap

        public java.util.function.Supplier<java.util.Map<java.lang.String,​java.lang.Object>> getSubstitutionMap()
        Specified by:
        getSubstitutionMap in interface net.minecraftforge.forgespi.locating.IModFile
      • getType

        public net.minecraftforge.forgespi.locating.IModFile.Type getType()
        Specified by:
        getType in interface net.minecraftforge.forgespi.locating.IModFile
      • getFilePath

        public java.nio.file.Path getFilePath()
        Specified by:
        getFilePath in interface net.minecraftforge.forgespi.locating.IModFile
      • getModInfos

        public java.util.List<net.minecraftforge.forgespi.language.IModInfo> getModInfos()
        Specified by:
        getModInfos in interface net.minecraftforge.forgespi.locating.IModFile
      • getAccessTransformer

        public java.util.Optional<java.nio.file.Path> getAccessTransformer()
      • identifyMods

        public boolean identifyMods()
      • getCoreMods

        public java.util.List<CoreModFile> getCoreMods()
      • compileContent

        public net.minecraftforge.forgespi.language.ModFileScanData compileContent()
        Run in an executor thread to harvest the class and annotation list
      • scanFile

        public void scanFile​(java.util.function.Consumer<java.nio.file.Path> pathConsumer)
      • setFutureScanResult

        public void setFutureScanResult​(java.util.concurrent.CompletableFuture<net.minecraftforge.forgespi.language.ModFileScanData> future)
      • getScanResult

        public net.minecraftforge.forgespi.language.ModFileScanData getScanResult()
        Specified by:
        getScanResult in interface net.minecraftforge.forgespi.locating.IModFile
      • setScanResult

        public void setScanResult​(net.minecraftforge.forgespi.language.ModFileScanData modFileScanData,
                                  java.lang.Throwable throwable)
      • setFileProperties

        public void setFileProperties​(java.util.Map<java.lang.String,​java.lang.Object> fileProperties)
      • getLoader

        public net.minecraftforge.forgespi.language.IModLanguageProvider getLoader()
        Specified by:
        getLoader in interface net.minecraftforge.forgespi.locating.IModFile
      • findResource

        public java.nio.file.Path findResource​(java.lang.String className)
        Specified by:
        findResource in interface net.minecraftforge.forgespi.locating.IModFile
      • identifyLanguage

        public void identifyLanguage()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFileName

        public java.lang.String getFileName()
        Specified by:
        getFileName in interface net.minecraftforge.forgespi.locating.IModFile
      • getLocator

        public net.minecraftforge.forgespi.locating.IModLocator getLocator()
        Specified by:
        getLocator in interface net.minecraftforge.forgespi.locating.IModFile
      • getModFileInfo

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

        public static net.minecraftforge.forgespi.locating.ModFileFactory buildFactory()
      • newFMLInstance

        public static ModFile newFMLInstance​(java.nio.file.Path path,
                                             net.minecraftforge.forgespi.locating.IModLocator locator)