-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathExample.java
More file actions
33 lines (28 loc) · 1.11 KB
/
Copy pathExample.java
File metadata and controls
33 lines (28 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package org.example;
import org.example.visitor.ClassPrinter;
import org.objectweb.asm.ClassReader;
import java.io.File;
import java.io.IOException;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
public class Example {
public static void main(String[] args) throws IOException {
// var printer = new ByteCodePrinter();
// printer.printBubbleSortBytecode();
// try (JarFile sampleJar = new JarFile("src/main/resources/sample.jar")) {
// Enumeration<JarEntry> enumeration = sampleJar.entries();
//
// while (enumeration.hasMoreElements()) {
// JarEntry entry = enumeration.nextElement();
// if (entry.getName().endsWith(".class")) {
// ClassPrinter cp = new ClassPrinter();
// ClassReader cr = new ClassReader(sampleJar.getInputStream(entry));
// cr.accept(cp, 0);
// }
// }
// }
JarMetrics jarMetrics = new JarMetrics("src/main/resources/lab2-DenisStepanidenko.jar");
jarMetrics.getMetrics();
}
}