Package org.cadixdev.lorenz.io
Class MappingsWriter
- java.lang.Object
-
- org.cadixdev.lorenz.io.MappingsWriter
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Direct Known Subclasses:
BinaryMappingsWriter,TextMappingsWriter
public abstract class MappingsWriter extends java.lang.Object implements java.io.CloseableRepresents a writer, that is capable of writing de-obfuscation mappings.Each mappings writer will be designed for a specific mapping format, and intended to be used with try-for-resources.
- Since:
- 0.4.0
- See Also:
TextMappingsWriter,BinaryMappingsWriter
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.util.Comparator<FieldMapping>ALPHABETISE_FIELDSDeprecated.0.5.5 UsegetConfig()MappingsWriterConfig.getFieldMappingComparator()insteadprotected static java.util.Comparator<Mapping>ALPHABETISE_MAPPINGSDeprecated.0.5.5 UsegetConfig()MappingsWriterConfig.getClassMappingComparator()insteadprotected static java.util.Comparator<MethodMapping>ALPHABETISE_METHODSDeprecated.0.5.5 UsegetConfig()MappingsWriterConfig.getMethodMappingComparator()insteadprotected MappingsWriterConfigconfig
-
Constructor Summary
Constructors Constructor Description MappingsWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description MappingsWriterConfiggetConfig()Gets the activewriter configurationfor this mappings writer.voidsetConfig(MappingsWriterConfig config)Sets the activewriter configurationfor this mappings writer - allowing the output of the writer to be fine-tuned to fit the environment in use.abstract voidwrite(MappingSet mappings)Writes the given mappings to the previously given output.
-
-
-
Field Detail
-
ALPHABETISE_MAPPINGS
@Deprecated protected static final java.util.Comparator<Mapping> ALPHABETISE_MAPPINGS
Deprecated.0.5.5 UsegetConfig()MappingsWriterConfig.getClassMappingComparator()insteadAComparatorused to alphabetise a collection ofMappings.
-
ALPHABETISE_FIELDS
@Deprecated protected static final java.util.Comparator<FieldMapping> ALPHABETISE_FIELDS
Deprecated.0.5.5 UsegetConfig()MappingsWriterConfig.getFieldMappingComparator()insteadAComparatorused to alphabetise a collection ofFieldMappings.- Since:
- 0.5.0
-
ALPHABETISE_METHODS
@Deprecated protected static final java.util.Comparator<MethodMapping> ALPHABETISE_METHODS
Deprecated.0.5.5 UsegetConfig()MappingsWriterConfig.getMethodMappingComparator()insteadAComparatorused to alphabetise a collection ofMethodMappings.- Since:
- 0.5.0
-
config
protected MappingsWriterConfig config
-
-
Method Detail
-
getConfig
public MappingsWriterConfig getConfig()
Gets the activewriter configurationfor this mappings writer.- Returns:
- The writer configuration
- Since:
- 0.5.5
-
setConfig
public void setConfig(MappingsWriterConfig config)
Sets the activewriter configurationfor this mappings writer - allowing the output of the writer to be fine-tuned to fit the environment in use.- Parameters:
config- The writer configuration- Throws:
java.lang.NullPointerException- Ifconfigisnull- Since:
- 0.5.5
-
write
public abstract void write(MappingSet mappings) throws java.io.IOException
Writes the given mappings to the previously given output.- Parameters:
mappings- The mapping set- Throws:
java.io.IOException- Should an IO issue occur
-
-