Package megamek.common.jacksonAdapters
Class MMUWriter
java.lang.Object
megamek.common.jacksonAdapters.MMUWriter
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteMMUFile(File file, List<?> contents) Writes any of the given objects that are of a supported type to the given file in MMU (YAML) format.voidwriteMMUFileFullStats(File file, List<?> contents) Writes any of the given objects that are of a supported type to the given file in MMU (YAML) format.
-
Constructor Details
-
MMUWriter
public MMUWriter()
-
-
Method Details
-
writeMMUFile
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
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
-