Class AbstractJarFileLocator

  • All Implemented Interfaces:
    net.minecraftforge.forgespi.locating.IModLocator
    Direct Known Subclasses:
    ClasspathLocator, MavenDirectoryLocator, ModsFolderLocator

    public abstract class AbstractJarFileLocator
    extends java.lang.Object
    implements net.minecraftforge.forgespi.locating.IModLocator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.reflect.Method ENSURE_INIT  
      private static org.apache.logging.log4j.Logger LOGGER  
      protected java.util.Map<net.minecraftforge.forgespi.locating.IModFile,​java.nio.file.FileSystem> modJars  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.nio.file.FileSystem createFileSystem​(net.minecraftforge.forgespi.locating.IModFile modFile)  
      java.util.Optional<java.util.jar.Manifest> findManifest​(java.nio.file.Path file)  
      org.apache.commons.lang3.tuple.Pair<java.util.Optional<java.util.jar.Manifest>,​java.util.Optional<java.security.CodeSigner[]>> findManifestAndSigners​(java.nio.file.Path file)  
      java.nio.file.Path findPath​(net.minecraftforge.forgespi.locating.IModFile modFile, java.lang.String... path)  
      boolean isValid​(net.minecraftforge.forgespi.locating.IModFile modFile)  
      void scanFile​(net.minecraftforge.forgespi.locating.IModFile file, java.util.function.Consumer<java.nio.file.Path> pathConsumer)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface net.minecraftforge.forgespi.locating.IModLocator

        initArguments, name, scanMods
    • Field Detail

      • LOGGER

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

        protected final java.util.Map<net.minecraftforge.forgespi.locating.IModFile,​java.nio.file.FileSystem> modJars
      • ENSURE_INIT

        static final java.lang.reflect.Method ENSURE_INIT
    • Constructor Detail

      • AbstractJarFileLocator

        public AbstractJarFileLocator()
    • Method Detail

      • createFileSystem

        protected java.nio.file.FileSystem createFileSystem​(net.minecraftforge.forgespi.locating.IModFile modFile)
      • findPath

        public java.nio.file.Path findPath​(net.minecraftforge.forgespi.locating.IModFile modFile,
                                           java.lang.String... path)
        Specified by:
        findPath in interface net.minecraftforge.forgespi.locating.IModLocator
      • scanFile

        public void scanFile​(net.minecraftforge.forgespi.locating.IModFile file,
                             java.util.function.Consumer<java.nio.file.Path> pathConsumer)
        Specified by:
        scanFile in interface net.minecraftforge.forgespi.locating.IModLocator
      • findManifest

        public java.util.Optional<java.util.jar.Manifest> findManifest​(java.nio.file.Path file)
        Specified by:
        findManifest in interface net.minecraftforge.forgespi.locating.IModLocator
      • findManifestAndSigners

        public org.apache.commons.lang3.tuple.Pair<java.util.Optional<java.util.jar.Manifest>,​java.util.Optional<java.security.CodeSigner[]>> findManifestAndSigners​(java.nio.file.Path file)
        Specified by:
        findManifestAndSigners in interface net.minecraftforge.forgespi.locating.IModLocator
      • isValid

        public boolean isValid​(net.minecraftforge.forgespi.locating.IModFile modFile)
        Specified by:
        isValid in interface net.minecraftforge.forgespi.locating.IModLocator