Пример #1
0
 @Override
 public String getClassContent(StructClass cl) {
   try {
     TextBuffer buffer = new TextBuffer(ClassesProcessor.AVERAGE_CLASS_SIZE);
     buffer.append(DecompilerContext.getProperty(IFernflowerPreferences.BANNER).toString());
     classesProcessor.writeClass(cl, buffer);
     return buffer.toString();
   } catch (Throwable ex) {
     DecompilerContext.getLogger()
         .writeMessage("Class " + cl.qualifiedName + " couldn't be fully decompiled.", ex);
     return null;
   }
 }
Пример #2
0
 @Override
 public String getClassEntryName(StructClass cl, String entryName) {
   ClassNode node = classesProcessor.getMapRootClasses().get(cl.qualifiedName);
   if (node.type != ClassNode.CLASS_ROOT) {
     return null;
   } else {
     if (DecompilerContext.getOption(IFernflowerPreferences.RENAME_ENTITIES)) {
       String simple_classname = cl.qualifiedName.substring(cl.qualifiedName.lastIndexOf('/') + 1);
       return entryName.substring(0, entryName.lastIndexOf('/') + 1) + simple_classname + ".java";
     } else {
       return entryName.substring(0, entryName.lastIndexOf(".class")) + ".java";
     }
   }
 }