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

Method initFromMatches

src/main/java/matcher/Matcher.java:97–124  ·  view source on GitHub ↗
(List<Path> inputDirs,
			List<InputFile> inputFilesA, List<InputFile> inputFilesB,
			List<InputFile> cpFiles,
			List<InputFile> cpFilesA, List<InputFile> cpFilesB,
			String nonObfuscatedClassPatternA, String nonObfuscatedClassPatternB, String nonObfuscatedMemberPatternA, String nonObfuscatedMemberPatternB,
			DoubleConsumer progressReceiver)

Source from the content-addressed store, hash-verified

95 }
96
97 public void initFromMatches(List<Path> inputDirs,
98 List<InputFile> inputFilesA, List<InputFile> inputFilesB,
99 List<InputFile> cpFiles,
100 List<InputFile> cpFilesA, List<InputFile> cpFilesB,
101 String nonObfuscatedClassPatternA, String nonObfuscatedClassPatternB, String nonObfuscatedMemberPatternA, String nonObfuscatedMemberPatternB,
102 DoubleConsumer progressReceiver) throws IOException {
103 List<Path> pathsA = resolvePaths(inputDirs, inputFilesA);
104 List<Path> pathsB = resolvePaths(inputDirs, inputFilesB);
105 List<Path> sharedClassPath = resolvePaths(inputDirs, cpFiles);
106 List<Path> classPathA = resolvePaths(inputDirs, cpFilesA);
107 List<Path> classPathB = resolvePaths(inputDirs, cpFilesB);
108
109 ProjectConfig config = new ProjectConfig.Builder(pathsA, pathsB)
110 .classPathA(new ArrayList<>(classPathA))
111 .classPathB(new ArrayList<>(classPathB))
112 .sharedClassPath(new ArrayList<>(sharedClassPath))
113 .nonObfuscatedClassPatternA(nonObfuscatedClassPatternA)
114 .nonObfuscatedClassPatternB(nonObfuscatedClassPatternB)
115 .nonObfuscatedMemberPatternA(nonObfuscatedMemberPatternA)
116 .nonObfuscatedMemberPatternB(nonObfuscatedMemberPatternB)
117 .build();
118 if (!config.isValid()) throw new IOException("invalid config");
119 Config.setProjectConfig(config);
120 Config.saveAsLast();
121
122 reset();
123 init(config, progressReceiver);
124 }
125
126 public static Path resolvePath(Collection<Path> inputDirs, InputFile inputFile) throws IOException {
127 List<Path> ret = resolvePaths(inputDirs, Collections.singletonList(inputFile));

Callers 1

readMethod · 0.80

Calls 14

resolvePathsMethod · 0.95
isValidMethod · 0.95
setProjectConfigMethod · 0.95
saveAsLastMethod · 0.95
resetMethod · 0.95
initMethod · 0.95
buildMethod · 0.80
sharedClassPathMethod · 0.80

Tested by

no test coverage detected