use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class JavaTranslator method testSystemClass.
public static void testSystemClass() {
Translator translator = new JavaTranslator(Enum.class);
translator.apply();
System.out.print(translator);
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class StressTest method runAllClassesInDex.
public static void runAllClassesInDex(String jarCanonicalPath) throws Exception {
DexFile dexFile = DexlibLoader.loadDexFile(new File(jarCanonicalPath));
Set<? extends ClassDef> allClassesInDex = dexFile.getClasses();
for (ClassDef currentClass : allClassesInDex) {
String normType = DexlibAdapter.getClassStringFromDex(currentClass.getType());
Translator sourceGenerator = TranslatorFactory.createTranslator(normType, new File(jarCanonicalPath));
sourceGenerator.apply();
System.out.println(sourceGenerator.toString());
}
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class StressTest method runAllClassesInJar.
public static void runAllClassesInJar(String jarCanonicalPath) throws Exception {
List<String> allStuff = JarReader.readClassNamesFromJar(new File(jarCanonicalPath), new LinkedList<ContentReader.Component>());
for (String currentClass : allStuff) {
Translator sourceGenerator = TranslatorFactory.createTranslator(currentClass, new File(jarCanonicalPath));
sourceGenerator.apply();
System.out.println(sourceGenerator.toString());
}
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class JavaTranslator method testJar.
public static void testJar() {
final File testFile = new File(System.getProperty("user.home") + "/Desktop/" + "ClassyShark.jar");
String textClass = "com.google.classyshark.gui.panel.reducer.Reducer.class";
Translator sourceGenerator = TranslatorFactory.createTranslator(textClass, testFile);
sourceGenerator.apply();
System.out.println(sourceGenerator.toString());
}
use of com.google.classyshark.silverghost.translator.Translator in project android-classyshark by google.
the class JavaTranslator method testCustomClass.
public static void testCustomClass() {
final File testFile = new File(System.getProperty("user.home") + "/Desktop/Scenarios/2 Class/Reducer.class");
String textClass = "com.google.classyshark.gui.panel.reducer.Reducer.class";
Translator translator = TranslatorFactory.createTranslator(textClass, testFile);
translator.apply();
System.out.println(translator.toString());
}
Aggregations