Class OuterClassNamePropagator

java.lang.Object
net.fabricmc.mappingio.adapter.ForwardingMappingVisitor
net.fabricmc.mappingio.adapter.OuterClassNamePropagator
All Implemented Interfaces:
MappingVisitor

public class OuterClassNamePropagator extends ForwardingMappingVisitor
Searches for inner classes with no mapped name, whose enclosing classes do have mapped names, and applies those to the outer part of the inner classes' fully qualified name.

For example, it takes a class class_1$class_2 that doesn't have a mapping, tries to find class_1, which let's say has the mapping SomeClass, and changes the former's destination name to SomeClass$class_2.

Implementation Note:
This visitor requires two pre-passes: one to collect all classes and their mappings, the other to actually apply the outer names. The third pass onwards will then emit the final mappings.