Class MMUWriter

java.lang.Object
megamek.common.jacksonAdapters.MMUWriter

public class MMUWriter extends Object
This class has static methods for writing information to an MMU file which uses YAML formatting to hold information about SBF Formations, Units and AlphaStrikeElements.
  • Constructor Details

    • MMUWriter

      public MMUWriter()
  • Method Details

    • writeMMUFile

      public void writeMMUFile(File file, List<?> contents) throws IOException
      Writes any of the given objects that are of a supported type to the given file in MMU (YAML) format. Will do nothing if none of the objects are supported for serialization. This method will write only necessary stats and link to the unit cache for canon units.
      Parameters:
      file - The file to write to. Will be overwritten if present.
      contents - The objects to write.
      Throws:
      IOException
    • writeMMUFileFullStats

      public void writeMMUFileFullStats(File file, List<?> contents) throws IOException
      Writes any of the given objects that are of a supported type to the given file in MMU (YAML) format. Will do nothing if none of the objects are supported for serialization. This method will write the full stats of all objects even if any are a canon unit.
      Parameters:
      file - The file to write to. Will be overwritten if present.
      contents - The objects to write.
      Throws:
      IOException