use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class MetaObjectDex method main.
public static void main(String[] args) throws Exception {
final File testFile = new File(System.getProperty("user.home") + "/Desktop/classes.dex");
String textClass = "com.google.common.collect.ImmutableSortedMap";
Translator translator = TranslatorFactory.createTranslator(textClass, testFile);
translator.apply();
System.out.println(translator.toString());
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class SilverGhostFacade method getManifest.
public static String getManifest(File archiveFile) {
if (!archiveFile.getName().endsWith(".apk")) {
return "";
}
Translator translator = TranslatorFactory.createTranslator("AndroidManifest.xml", archiveFile);
translator.apply();
return translator.toString();
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class SilverGhostFacade method getGeneratedClassString.
public static String getGeneratedClassString(String className, File archiveFile) {
String result;
Translator translator = TranslatorFactory.createTranslator(className, archiveFile, getAllClassNames(archiveFile));
try {
translator.apply();
result = translator.toString();
} catch (NullPointerException npe) {
System.out.println("Class doesn't exist in the writeArchive");
return "";
}
return result;
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class DisplayArea method main.
public static void main(String[] args) {
DisplayArea da = new DisplayArea(null);
Translator emitter = new JavaTranslator(StringTokenizer.class);
emitter.apply();
da.displayClass(emitter.getElementsList(), "");
JFrame frame = new JFrame("Test");
frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
frame.getContentPane().add(da.onAddComponentToPane());
frame.pack();
frame.setVisible(true);
}
Aggregations