MCPcopy Create free account
hub / github.com/FabricMC/Matcher / shouldExport

Method shouldExport

src/main/java/matcher/mapping/Mappings.java:766–775  ·  view source on GitHub ↗
(MethodInstance method, MappingFormat format, List<NameType> nsTypes,
			MappingsExportVerbosity verbosity, boolean forAnyInput, Set<Set<MethodInstance>> exportedHierarchies)

Source from the content-addressed store, hash-verified

764 }
765
766 private static boolean shouldExport(MethodInstance method, MappingFormat format, List<NameType> nsTypes,
767 MappingsExportVerbosity verbosity, boolean forAnyInput, Set<Set<MethodInstance>> exportedHierarchies) {
768 String srcName = method.getName(nsTypes.get(0));
769 if (srcName == null) return false;
770
771 return format.supportsComments && method.getMappedComment() != null
772 || format.supportsArgs && shouldExportAny(method.getArgs(), format, nsTypes)
773 || format.supportsLocals && shouldExportAny(method.getVars(), format, nsTypes)
774 || hasAnyNames(method, srcName, nsTypes) && shouldExportName(method, verbosity, forAnyInput, exportedHierarchies);
775 }
776
777 private static boolean shouldExport(MethodVarInstance var, MappingFormat format, List<NameType> nsTypes) {
778 String srcName = var.getName(nsTypes.get(0));

Callers 3

exportMethodsMethod · 0.95
exportFieldsMethod · 0.95
shouldExportAnyMethod · 0.95

Calls 8

shouldExportAnyMethod · 0.95
hasAnyNamesMethod · 0.95
shouldExportNameMethod · 0.95
getVarsMethod · 0.80
getNameMethod · 0.65
getMappedCommentMethod · 0.65
getMethod · 0.45
getArgsMethod · 0.45

Tested by

no test coverage detected