Package net.md_5.specialsource
Class JarMapping
java.lang.Object
net.md_5.specialsource.JarMapping
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJarMapping(JarComparer oldJar, JarComparer newJar, File logFile, boolean compact) JarMapping(JarComparer oldJar, JarComparer newJar, File logfile, boolean compact, boolean full) Generate a mapping given an original jar and renamed jar -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExcludedPackage(String packageName) Add a class name prefix to the mapping ignore list.voidloadMappings(BufferedReader reader, MappingTransformer inputTransformer, MappingTransformer outputTransformer, boolean reverse) Load a mapping given a .csrg filevoidloadMappings(File file) voidloadMappings(InputStream stream) voidloadMappings(String filename, boolean reverse, boolean numericSrgNames, String inShadeRelocation, String outShadeRelocation) voidsetFallbackInheritanceProvider(InheritanceProvider fallbackInheritanceProvider) Set the inheritance provider to be consulted if the inheritance map has no information on the requested class (results will be cached in the inheritance map).voidsetInheritanceMap(InheritanceMap inheritanceMap) Set the inheritance map used for caching superclass/interfaces.
-
Field Details
-
packages
-
classes
-
fields
-
methods
-
newJar
-
-
Constructor Details
-
JarMapping
public JarMapping() -
JarMapping
public JarMapping(JarComparer oldJar, JarComparer newJar, File logFile, boolean compact) throws IOException - Throws:
IOException
-
JarMapping
public JarMapping(JarComparer oldJar, JarComparer newJar, File logfile, boolean compact, boolean full) throws IOException Generate a mapping given an original jar and renamed jar- Parameters:
oldJar- Original jarnewJar- Renamed jarlogfile- Optional .srg file to output mappings tocompact- If true, generate .csrg logfile instead of .srgfull- if true, generate duplicates- Throws:
IOException
-
-
Method Details
-
setInheritanceMap
Set the inheritance map used for caching superclass/interfaces. This call be omitted to use a local cache, or set to your own global cache. -
setFallbackInheritanceProvider
Set the inheritance provider to be consulted if the inheritance map has no information on the requested class (results will be cached in the inheritance map). -
addExcludedPackage
Add a class name prefix to the mapping ignore list. Note: this only applies before loading mappings, not after -
tryClimb
-
loadMappings
- Throws:
IOException
-
loadMappings
- Throws:
IOException
-
loadMappings
public void loadMappings(String filename, boolean reverse, boolean numericSrgNames, String inShadeRelocation, String outShadeRelocation) throws IOException - Parameters:
filename- A filename of a .srg/.csrg or an MCP directory of .srg+.csv, local or remotereverse- Swap input and output mappingsnumericSrgNames- When reading mapping directory, load numeric "srg" instead obfuscated namesinShadeRelocation- Apply relocation on mapping inputoutShadeRelocation- Apply relocation on mapping output- Throws:
IOException
-
loadMappings
public void loadMappings(BufferedReader reader, MappingTransformer inputTransformer, MappingTransformer outputTransformer, boolean reverse) throws IOException Load a mapping given a .csrg file- Parameters:
reader- Mapping file readerinputTransformer- Transformation to apply on inputoutputTransformer- Transformation to apply on outputreverse- Swap input and output mappings (after applying any input/output transformations)- Throws:
IOException
-