Package net.fabricmc.mappingio.adapter
Class FlatAsRegularMappingVisitor
java.lang.Object
net.fabricmc.mappingio.adapter.FlatAsRegularMappingVisitor
- All Implemented Interfaces:
MappingVisitor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetFlags()voidreset()Reset the visitor including any chained visitors to allow for another independent visit (excluding visitEnd=false).booleanvisitClass(String srcName) voidvisitComment(MappedElementKind targetKind, String comment) Comment for the specified element (last content-visited or any parent).booleanDetermine whether the mapping content (classes and anything below, metadata if not part of the header) should be visited.voidvisitDstDesc(MappedElementKind targetKind, int namespace, String desc) 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.booleanvisitEnd()Finish the visitation pass.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)
-
Constructor Details
-
FlatAsRegularMappingVisitor
-
-
Method Details
-
getFlags
- Specified by:
getFlagsin interfaceMappingVisitor
-
reset
public void reset()Description copied from interface:MappingVisitorReset the visitor including any chained visitors to allow for another independent visit (excluding visitEnd=false).- Specified by:
resetin interfaceMappingVisitor
-
visitHeader
Description copied from interface:MappingVisitorDetermine whether the header (namespaces, metadata if part of the header) should be visited.- Specified by:
visitHeaderin interfaceMappingVisitor- Returns:
- true if the header is to be visited, false otherwise
- Throws:
IOException
-
visitNamespaces
- Specified by:
visitNamespacesin interfaceMappingVisitor- Throws:
IOException
-
visitMetadata
- Specified by:
visitMetadatain interfaceMappingVisitor- 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- Returns:
- true if content is to be visited, false otherwise
- Throws:
IOException
-
visitClass
- Specified by:
visitClassin interfaceMappingVisitor
-
visitField
- Specified by:
visitFieldin interfaceMappingVisitor
-
visitMethod
- Specified by:
visitMethodin interfaceMappingVisitor
-
visitMethodArg
- Specified by:
visitMethodArgin interfaceMappingVisitor
-
visitMethodVar
public boolean visitMethodVar(int lvtRowIndex, int lvIndex, int startOpIdx, int endOpIdx, @Nullable @Nullable String srcName) - Specified by:
visitMethodVarin interfaceMappingVisitor
-
visitEnd
Description copied from interface:MappingVisitorFinish the visitation pass.- Specified by:
visitEndin interfaceMappingVisitor- Returns:
- true if the visitation pass is final, false if it should be started over
- Throws:
IOException
-
visitDstName
Description copied from interface:MappingVisitorDestination name for the current element.- Specified by:
visitDstNamein interfaceMappingVisitor- Parameters:
namespace- namespace index, index into the dstNamespaces List inMappingVisitor.visitNamespaces(java.lang.String, java.util.List<java.lang.String>)name- destination name
-
visitDstDesc
- Specified by:
visitDstDescin interfaceMappingVisitor
-
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- Returns:
- true if the contents are to be visited, false otherwise
- Throws:
IOException
-
visitComment
Description copied from interface:MappingVisitorComment for the specified element (last content-visited or any parent).- Specified by:
visitCommentin interfaceMappingVisitor- Parameters:
comment- comment as a potentially multi-line string- Throws:
IOException
-