use of com.google.classyshark.gui.panel.reducer.Reducer in project android-classyshark by google.
the class SilverGhost method readContents.
// 1. READ CONTENTS
public void readContents() {
contentReader = new ContentReader(getBinaryArchive());
long start = System.currentTimeMillis();
contentReader.load();
reducer = new Reducer(contentReader.getAllClassNames());
System.out.println("Archive Reading " + (System.currentTimeMillis() - start) + " ms ");
if (binaryArchive.getName().endsWith(".apk")) {
Translator translator = TranslatorFactory.createTranslator("AndroidManifest.xml", binaryArchive);
translator.apply();
manifestStr = translator.toString();
}
fullArchiveReader.readAsyncArchive(binaryArchive);
}
use of com.google.classyshark.gui.panel.reducer.Reducer in project android-classyshark by google.
the class FilesTree method main.
public static void main(String[] args) {
File test = new File(System.getProperty("user.home") + "/Desktop/ClassyShark/Scenarios/7 Jayce/data.jar");
FilesTree filesTree = new FilesTree(null);
ContentReader loader = new ContentReader(test);
loader.load();
Reducer reducer = new Reducer(loader.getAllClassNames());
reducer.reduce("");
filesTree.fillArchive(test, reducer.getAllClassNames(), loader.getAllComponents());
for (String s : reducer.getAllClassNames()) {
System.out.println(NodeInfo.extractClassName(s));
}
JFrame frame = new JFrame("Test");
JScrollPane scrolledTree = new JScrollPane(filesTree.getJTree());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(scrolledTree);
frame.pack();
frame.setVisible(true);
}
Aggregations