Mapping Extended (Paragraph Delimited Mapping Extended (MappingEx)) is a Java Mapping format used for FeatureCreep but is open for anyone to use for whatever reason.
MappingEx is a mappings format delimated by ¶. The order is
Type¶Original Name¶New Name¶Method Name¶Position¶Description
however the official default is
tipo¶original¶nuevo¶def¶pos¶desc
These are indicated in the 1st line, which is to be ignored by parsers and can in reality be anything.
Type: This is the type. This depends on what object type. These will be covered in more detail.
Original: The original name of the object. These will be covered in mroe detail. Should be nil
for most Params. Include Classname and descriptor and return type for Methods and Classname and return type for Fields.
New Name: These are the new names. This is the name only, no descriptor or classname, just new name (except for Classes which still need to define their full name).
Method Name: For Params only, for others should be nil
. This is ClassName.methodname(descriptor)type of the method you want to change the parameter.
Position: For Params only, for others should be nil
. The position in the constructor the param you want to remap is. Starts at 1(For java, however it can depend on language) like Java bytecode since 0 is this. Works for local vars as well in the future.
Description: An description about the Class/Method/Field/Param
There are a few types which are included used for different things.These are the types.
Class
Used for Classes
Var
Used for Fields
Def
Used for Methods
Param
Used for Paramaters and Local Variables (when we implement local variables)
The order parsers should prefer should be. Param, Var, Def, Class. However Def and Var may be switched.
Incluir
/Include
Both Include
and Incluir
are valid types and parsers should take this into account. Then in the next section you write the complete name (including the package). Lastly you write the inherited classes including the super class and the interfaces. Separate the classes/interfaces with commas (,). All names need the packages.
Original Names. Format should depend on the type.
Class: For classes it should be packageName.ClassName$SubClass. If there are no Subclasses the Subclass can be ommited, same goes for Package.
Def: For methods it should be full path to method including Descriptor, return type, and full original class name. An example would be featurecreep.example.ExampleClass$SubClass.TEST_METH(ILjava/lang/String;Ljava/lang/String;)V for a void that has an int and 2 Strings. You can read more about bytecode signatures and descriptors for more information. The package name is to be included in the class name.
Var: For variables the format is full.path.to.TheClass.FIELD_NAME:Lreturn.Descriptor;. The package name is to be included in the class name.Semicolon is only needed on the descriptor on nonprimatives.
Param: Should in most cases be nil
however you may still try to put the name if you know it but this is unlikely to work. Order is the preferred method of finding.
Include For classes it should be packageName.ClassName$SubClass. If there are no Subclasses the Subclass can be ommited, same goes for Package.
The new names after remapping, Unlike Original however, with the exception of Classes, only the end name is included, not the descriptors, return type, or Class a Field/Method is from or the Method name a param is from. Only the new name you want, the descriptor, return type, class, and param's method shall stay the same.
For Classes you still need to define the full name of the class in the same format as original. Be careful to account for access restrictions (such as Protected or Blank Access Modifier) as breaking access can make the remapped code have errors or crash.
For Includes put a list of the extended and implemented classes and interfaces. Separate the classes/interfaces with commas (,).
Only for Params. All others should answer nil
. This is the original (unmapped) name of the class and method of which this is a param for. It should be in the same format as Original name for Def (see above).
Only for Params. All others should answer nil
. The position of the param/local var starting at 1. 0(this) is not a supported number in Java but can be used in other langages which start at 1. For params it should be the position in the constructor, for local vars you can keep counting (however local vars are not implemented yet). You can use Jdac to get the position if you do not know.
A basic short description for JavaDoc. Should use only charachers legal in Java code (or whatever language you are deobfascating). If a method does not have a description but a param does A blank description will be provided for the method while the param gets a javadoc.
Here is an example of a file:
tipo¶original¶nuevo¶def¶pos¶desc Class¶featurecreep.example.ExampleClass$SubClass¶abc¶nil¶nil¶An example of a class Var¶featurecreep.example.ExampleClass$SubClass.TEST_FIELD:Z¶OBF_FIELD¶nil¶nil¶An example of a Field Def¶featurecreep.example.ExampleClass$SubClass.TEST_METH(ILjava/lang/String;Ljava/lang/String;)V¶methodNameOnly¶nil¶nil¶An example of a Method Param¶nil¶name¶featurecreep.example.ExampleClass$SubClass.TEST_METH(ILjava/lang/String;Ljava/lang/String;)V¶1¶An example of a Parameter Incluir¶clase.OriginalClase¶clase.SuperClase,clase.InterfaceImplimentado,clase.OtroInterfaceImplimentado¶nil¶nil¶ Include¶class.OriginalClass¶class.SuperClass,class.InterfaceImplimented,class.OtherImplementedInterface¶nil¶nil¶
It can be opened in a basic text editor or a CSV opener by setting the seperator to ¶
The default file extension is .pdme