Class MappingNsCompleter

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

public final class MappingNsCompleter extends ForwardingMappingVisitor
A mapping visitor that completes missing destination names.

Some mapping formats allow omitting destination names if equal to the source name. This visitor fills in these "holes" by copying names from another namespace.

  • Constructor Details

    • MappingNsCompleter

      public MappingNsCompleter(MappingVisitor next)
      Constructs a new MappingNsCompleter which completes all destination namespaces.
      Parameters:
      next - The next visitor to forward the data to.
    • MappingNsCompleter

      public MappingNsCompleter(MappingVisitor next, @Nullable @Nullable Map<String,String> alternatives)
      Parameters:
      next - The next visitor to forward the data to.
      alternatives - A map of which namespaces should copy from which others. Passing null causes all destination namespaces to be completed.
    • MappingNsCompleter

      public MappingNsCompleter(MappingVisitor next, @Nullable @Nullable Map<String,String> alternatives, boolean addMissingNs)
      Parameters:
      next - The next visitor to forward the data to.
      alternatives - A map of which namespaces should copy from which others. Passing null causes all destination namespaces to be completed.
      addMissingNs - Whether to copy namespaces from the alternatives key set if not already present.
  • Method Details