Class MappingsShrieker

java.lang.Object
fr.skytasul.reflection.shrieker.MappingsShrieker

public class MappingsShrieker extends Object
Warning: make sure all necessary classes (outside the reflected ones) are present in the classpath, otherwise it would not work!
  • Constructor Details

    • MappingsShrieker

      public MappingsShrieker(@NotNull @NotNull fr.skytasul.reflection.mappings.files.MappingType mappingType, @NotNull @NotNull MappingsShrieker.ReflectionInitializer initializeFunction)
      Creates a shrieker instance.
      Parameters:
      mappingType - type of mappings in the output file
      initializeFunction - function that is called for each call to registerVersionMappings(Version, Mappings). All reflection accesses made to the Mappings passed as parameter to this function will be recorded and used to create the reduced mappings.
  • Method Details

    • registerVersionMappings

      public void registerVersionMappings(@NotNull @NotNull fr.skytasul.reflection.Version version, @NotNull @NotNull fr.skytasul.reflection.mappings.Mappings mappings) throws ReflectiveOperationException
      Register the mappings used for a specific version.
      Parameters:
      version - the version of the mappings
      mappings - mappings of this version
      Throws:
      ReflectiveOperationException - if an error happened while initializing the reflection
    • getReducedMappings

      @NotNull public @NotNull Map<fr.skytasul.reflection.Version,fr.skytasul.reflection.mappings.Mappings> getReducedMappings()
    • writeMappingsFile

      public void writeMappingsFile(@NotNull @NotNull Path mappingsPath) throws IOException
      Write all constructed reduced mappings to the path specified.
      Parameters:
      mappingsPath -
      Throws:
      IOException - if an error occurred while writing the mappings file