MCPcopy Create free account
hub / github.com/ReadyTalk/avian / findClass

Method findClass

test/LazyLoading.java:12–26  ·  view source on GitHub ↗
(String name, File directory)

Source from the content-addressed store, hash-verified

10 }
11
12 private static File findClass(String name, File directory) {
13 for (File file: directory.listFiles()) {
14 if (file.isFile()) {
15 if (file.getName().equals(name + ".class")) {
16 return file;
17 }
18 } else if (file.isDirectory()) {
19 File result = findClass(name, file);
20 if (result != null) {
21 return result;
22 }
23 }
24 }
25 return null;
26 }
27
28 private static byte[] read(File file) throws IOException {
29 byte[] bytes = new byte[(int) file.length()];

Callers 1

findClassMethod · 0.95

Calls 5

listFilesMethod · 0.80
isFileMethod · 0.80
equalsMethod · 0.65
getNameMethod · 0.65
isDirectoryMethod · 0.45

Tested by

no test coverage detected