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 whose effective destination name contains outer classes referenced via their source name, waits for mappings for these enclosing classes, and applies the latters' destination names to the formers' 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.