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

Method toString

src/main/java/matcher/type/InputFile.java:96–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 }
95
96 @Override
97 public String toString() {
98 if (fileName != null) {
99 return fileName;
100 } else if (pathHint != null) {
101 return pathHint.getFileName().toString();
102 } else if (hash != null && hash.length >= 8) {
103 return Long.toUnsignedString((hash[0] & 0xffL) << 56 | (hash[1] & 0xffL) << 48 | (hash[2] & 0xffL) << 40 | (hash[3] & 0xffL) << 32
104 | (hash[4] & 0xffL) << 24 | (hash[5] & 0xffL) << 16 | (hash[6] & 0xffL) << 8 | hash[7] & 0xffL, 16);
105 } else {
106 return "unknown";
107 }
108 }
109
110 private static String getSanitizedFileName(Path path) {
111 return path.getFileName().toString().replace('\n', ' ');

Callers 11

hashCodeMethod · 0.95
processClassPathMethod · 0.45
createLocalVariablesMethod · 0.45
dumpMethod · 0.45
dumpVarsMethod · 0.45
dumpMethod · 0.45
getDisplayNameMethod · 0.45
getDescMethod · 0.45
getSanitizedFileNameMethod · 0.45
initClassPathMethod · 0.45
getDisplayNameMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected