Package net.fabricmc.mappingio.adapter
Class MappingNsCompleter
java.lang.Object
net.fabricmc.mappingio.adapter.ForwardingMappingVisitor
net.fabricmc.mappingio.adapter.MappingNsCompleter
- All Implemented Interfaces:
MappingVisitor
-
Field Summary
Fields inherited from class net.fabricmc.mappingio.adapter.ForwardingMappingVisitor
next -
Constructor Summary
ConstructorsConstructorDescriptionMappingNsCompleter(MappingVisitor next, Map<String, String> alternatives) MappingNsCompleter(MappingVisitor next, Map<String, String> alternatives, boolean addMissingNs) -
Method Summary
Modifier and TypeMethodDescriptionbooleanvisitClass(String srcName) booleanDetermine whether the mapping content (classes and anything below, metadata if not part of the header) should be visited.voidvisitDstName(MappedElementKind targetKind, int namespace, String name) Destination name for the current element.booleanvisitElementContent(MappedElementKind targetKind) Determine whether the element content (comment, sub-elements) should be visited.booleanvisitField(String srcName, @Nullable String srcDesc) booleanDetermine whether the header (namespaces, metadata if part of the header) should be visited.voidvisitMetadata(String key, @Nullable String value) booleanvisitMethod(String srcName, @Nullable String srcDesc) booleanvisitMethodArg(int argPosition, int lvIndex, @Nullable String srcName) booleanvisitMethodVar(int lvtRowIndex, int lvIndex, int startOpIdx, int endOpIdx, @Nullable String srcName) voidvisitNamespaces(String srcNamespace, List<String> dstNamespaces) Methods inherited from class net.fabricmc.mappingio.adapter.ForwardingMappingVisitor
getFlags, reset, visitComment, visitDstDesc, visitEnd
-
Constructor Details
-
MappingNsCompleter
-
MappingNsCompleter
public MappingNsCompleter(MappingVisitor next, Map<String, String> alternatives, boolean addMissingNs)
-
-
Method Details
-
visitHeader
Description copied from interface:MappingVisitorDetermine whether the header (namespaces, metadata if part of the header) should be visited.- Specified by:
visitHeaderin interfaceMappingVisitor- Overrides:
visitHeaderin classForwardingMappingVisitor- Returns:
- true if the header is to be visited, false otherwise
- Throws:
IOException
-
visitNamespaces
- Specified by:
visitNamespacesin interfaceMappingVisitor- Overrides:
visitNamespacesin classForwardingMappingVisitor- Throws:
IOException
-
visitMetadata
- Specified by:
visitMetadatain interfaceMappingVisitor- Overrides:
visitMetadatain classForwardingMappingVisitor- Throws:
IOException
-
visitContent
Description copied from interface:MappingVisitorDetermine whether the mapping content (classes and anything below, metadata if not part of the header) should be visited.- Specified by:
visitContentin interfaceMappingVisitor- Overrides:
visitContentin classForwardingMappingVisitor- Returns:
- true if content is to be visited, false otherwise
- Throws:
IOException
-
visitClass
- Specified by:
visitClassin interfaceMappingVisitor- Overrides:
visitClassin classForwardingMappingVisitor- Throws:
IOException
-
visitField
- Specified by:
visitFieldin interfaceMappingVisitor- Overrides:
visitFieldin classForwardingMappingVisitor- Throws:
IOException
-
visitMethod
- Specified by:
visitMethodin interfaceMappingVisitor- Overrides:
visitMethodin classForwardingMappingVisitor- Throws:
IOException
-
visitMethodArg
public boolean visitMethodArg(int argPosition, int lvIndex, @Nullable @Nullable String srcName) throws IOException - Specified by:
visitMethodArgin interfaceMappingVisitor- Overrides:
visitMethodArgin classForwardingMappingVisitor- Throws:
IOException
-
visitMethodVar
public boolean visitMethodVar(int lvtRowIndex, int lvIndex, int startOpIdx, int endOpIdx, @Nullable @Nullable String srcName) throws IOException - Specified by:
visitMethodVarin interfaceMappingVisitor- Overrides:
visitMethodVarin classForwardingMappingVisitor- Throws:
IOException
-
visitDstName
Description copied from interface:MappingVisitorDestination name for the current element.- Specified by:
visitDstNamein interfaceMappingVisitor- Overrides:
visitDstNamein classForwardingMappingVisitor- Parameters:
namespace- namespace index, index into the dstNamespaces List inMappingVisitor.visitNamespaces(java.lang.String, java.util.List<java.lang.String>)name- destination name
-
visitElementContent
Description copied from interface:MappingVisitorDetermine whether the element content (comment, sub-elements) should be visited.Called after visiting the target itself (e.g. visitClass for targetKind=class), its dst names and descs, but before any child elements or the comment.
This is also a notification about all available dst names having been passed on.
- Specified by:
visitElementContentin interfaceMappingVisitor- Overrides:
visitElementContentin classForwardingMappingVisitor- Returns:
- true if the contents are to be visited, false otherwise
- Throws:
IOException
-