Enum TinyMappingFormat
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<TinyMappingFormat>,java.lang.constant.Constable
public enum TinyMappingFormat extends java.lang.Enum<TinyMappingFormat>
mapping format.- Since:
- 2.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>> -
Enum Constant Summary
-
Method Summary
Modifier and Type Method Description org.cadixdev.lorenz.io.MappingsReadercreateReader(java.nio.file.Path path, java.lang.String from, java.lang.String to)Creates a newmappings readerfor the mappings contained by the path supplied.org.cadixdev.lorenz.io.MappingsWritercreateWriter(java.io.Writer writer, java.lang.String from, java.lang.String to)Creates a newmappings writerfor the writer supplied.protected abstract net.fabricmc.mapping.tree.TinyTreeload(java.io.BufferedReader reader)org.cadixdev.lorenz.MappingSetread(java.nio.file.Path path, java.lang.String from, java.lang.String to)Reads Tiny mappings from the given path, into a newmapping set.org.cadixdev.lorenz.MappingSetread(org.cadixdev.lorenz.MappingSet mappings, java.nio.file.Path path, java.lang.String from, java.lang.String to)Reads Tiny mappings from the given path, into the givenmapping set.static TinyMappingFormatvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static TinyMappingFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.voidwrite(org.cadixdev.lorenz.MappingSet mappings, java.nio.file.Path path, java.lang.String from, java.lang.String to)Write the givenmapping setto the file specified by the suppliedpath.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfMethods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
-
Enum Constant Details
-
STANDARD
Reads tiny mappings with new standard ("tiny"header).- See Also:
TinyMappingFactory.load(BufferedReader)
-
LEGACY
Reads tiny mappings with legacy format ("v1"header).- See Also:
TinyMappingFactory.loadLegacy(BufferedReader)
-
DETECT
Reads tiny mappings of either the standard (new) or legacy format.- See Also:
TinyMappingFactory.loadWithDetection(BufferedReader)
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
load
protected abstract net.fabricmc.mapping.tree.TinyTree load(java.io.BufferedReader reader) throws java.io.IOException, net.fabricmc.mapping.reader.v2.MappingParseException- Throws:
java.io.IOExceptionnet.fabricmc.mapping.reader.v2.MappingParseException
-
createWriter
public org.cadixdev.lorenz.io.MappingsWriter createWriter(java.io.Writer writer, java.lang.String from, java.lang.String to)Creates a newmappings writerfor the writer supplied.The resulting mappings written will use the
fromnamespace (for the obfuscated names in Lorenz) to thetonamespace (for the de-obfuscated names in Lorenz).- Parameters:
writer- TheWriterto write the mappings tofrom- The namespace to place the obfuscated names underto- The namespace to place the deobfuscated names under- Returns:
- The mappings writer
- Since:
- 3.0.0
-
write
public void write(org.cadixdev.lorenz.MappingSet mappings, java.nio.file.Path path, java.lang.String from, java.lang.String to) throws java.io.IOExceptionWrite the givenmapping setto the file specified by the suppliedpath.The resulting mappings written will use the
fromnamespace (for the obfuscated names in Lorenz) to thetonamespace (for the de-obfuscated names in Lorenz).- Parameters:
mappings- The mappings to writepath- The file to write the mappings tofrom- The namespace to place the obfuscated names underto- The namespace to place the deobfuscated names under- Throws:
java.io.IOException- if an I/O error occurs writing the file- Since:
- 3.0.0
-
createReader
public org.cadixdev.lorenz.io.MappingsReader createReader(java.nio.file.Path path, java.lang.String from, java.lang.String to) throws java.io.IOException, net.fabricmc.mapping.reader.v2.MappingParseExceptionCreates a newmappings readerfor the mappings contained by the path supplied.The resulting
mappingswill use the from namespace (as the obfuscated names in Lorenz) to the to namespace (as the de-obfuscated names in Lorenz).- Parameters:
path- The path to the Tiny mappingsfrom- The namespace to use in the tiny file, as Lorenz's obfuscated namesto- The namespace to use in the tiny file, as Lorenz's de-obfuscated names- Returns:
- The mappings reader
- Throws:
java.io.IOException- if an I/O error occurs opening the filenet.fabricmc.mapping.reader.v2.MappingParseException
-
read
public org.cadixdev.lorenz.MappingSet read(org.cadixdev.lorenz.MappingSet mappings, java.nio.file.Path path, java.lang.String from, java.lang.String to) throws java.io.IOException, net.fabricmc.mapping.reader.v2.MappingParseExceptionReads Tiny mappings from the given path, into the givenmapping set.The resulting
mappingswill use the from namespace (as the obfuscated names in Lorenz) to the to namespace (as the de-obfuscated names in Lorenz).- Parameters:
mappings- The mapping set to read topath- The path to the Tiny mappingsfrom- The namespace to use in the tiny file, as Lorenz's obfuscated namesto- The namespace to use in the tiny file, as Lorenz's de-obfuscated names- Returns:
- The given mapping set
- Throws:
java.io.IOException- if an I/O error occurs opening the filenet.fabricmc.mapping.reader.v2.MappingParseException
-
read
public org.cadixdev.lorenz.MappingSet read(java.nio.file.Path path, java.lang.String from, java.lang.String to) throws java.io.IOException, net.fabricmc.mapping.reader.v2.MappingParseExceptionReads Tiny mappings from the given path, into a newmapping set.The resulting
mappingswill use the from namespace (as the obfuscated names in Lorenz) to the to namespace (as the de-obfuscated names in Lorenz).- Parameters:
path- The path to the Tiny mappingsfrom- The namespace to use in the tiny file, as Lorenz's obfuscated namesto- The namespace to use in the tiny file, as Lorenz's de-obfuscated names- Returns:
- The mapping set
- Throws:
java.io.IOException- if an I/O error occurs opening the filenet.fabricmc.mapping.reader.v2.MappingParseException
-