Package com.litecoding.smali2java.entity.java

Examples of com.litecoding.smali2java.entity.java.Comment


import com.litecoding.smali2java.renderer.SmaliRenderer.SmaliBlock;

public class JavaRenderer {
  public static List<Renderable> generateJavaEntities(SmaliMethod smaliMethod) {
    SmaliBlock block = null;
    Comment errorComment = null;
   
    try {
      block = SmaliRenderer.generateBlocks(smaliMethod);
     
      System.out.println("===[BEGIN OF BLOCK CHAIN]===");
      SmaliRenderer.printBlockChain(block);
      System.out.println("===[END OF BLOCK CHAIN]===");
      System.out.println();
    } catch(Exception e) {
      System.out.println("Exception while generating block");
      e.printStackTrace();
     
      StringWriter sw = new StringWriter();
      e.printStackTrace(new PrintWriter(sw));
      errorComment = new Comment(sw.toString());
    }
   
    List<Renderable> entities = new ArrayList<Renderable>();
    if(errorComment != null) {
      entities.add(errorComment);
      return entities;
    }
   
    if(!block.isPlain()) {
      //for this time we don't support block chains
      entities.add(new Comment("Can't render chain of blocks"));
      return entities;
    }
   
    if(smaliMethod.isConstructor()) {
      entities.addAll(generateConstructor(smaliMethod, block));
      return entities;
    }
   
    entities.add(new Comment("Can't render this method"));
   
    return entities;
  }
View Full Code Here


          var.setName(((Register)regEntity).getName());
          methodCall.getParams().add(var);
        }
       
        if(smaliClass.getSuperClassName().equals("Ljava/lang/Object;"))
          entity = new Comment(methodCall.render());
       
        entities.add(entity);
      }
    }
   
View Full Code Here

TOP

Related Classes of com.litecoding.smali2java.entity.java.Comment

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.