Package soot.rbclassload

Examples of soot.rbclassload.HierarchyGraph


  }

  private List<NumberedType> getTypeList(SootClass soot_class) {
   
    ClassHierarchy class_hierarchy = RootbeerClassLoader.v().getClassHierarchy();
    HierarchyGraph hgraph = class_hierarchy.getHierarchyGraph();

    Set<Integer> visited = new TreeSet<Integer>();
    visited.add(StringNumbers.v().addString(soot_class.getName()));
    LinkedList<String> queue = new LinkedList<String>();
    queue.add(soot_class.getName());
   
    Set<Integer> new_invokes = RootbeerClassLoader.v().getNewInvokes();
    List<NumberedType> ret = new ArrayList<NumberedType>();
   
    while(queue.isEmpty() == false){
      String entry = queue.removeFirst();
      Integer num = StringNumbers.v().addString(entry);
      if(new_invokes.contains(num)){
        NumberedType ntype = class_hierarchy.getNumberedType(entry);
        ret.add(ntype);
      }
     
      Set<Integer> children = hgraph.getChildren(num);
      for(Integer child : children){
        if(visited.contains(child)){
          continue;
        }
        visited.add(child);
View Full Code Here


     
      SootClass lhs_class = m_method.getDeclaringClass();
      SootClass rhs_class = other.m_method.getDeclaringClass();
      Integer lhs_number = RootbeerClassLoader.v().getClassNumber(lhs_class);
      Integer rhs_number = RootbeerClassLoader.v().getClassNumber(rhs_class);
      HierarchyGraph hgraph = RootbeerClassLoader.v().getClassHierarchy().getHierarchyGraph();
      if(hgraph.sameHierarchy(lhs_number, rhs_number)){
        return true;
      }
      return false;
    }
View Full Code Here

    Set<Type> dfs_types = RootbeerClassLoader.v().getDfsInfo().getDfsTypes();
    Set<String> dfs_string_types = getRefTypes(dfs_types);
   
    ClassHierarchy class_hierarchy = RootbeerClassLoader.v().getClassHierarchy();
    SootClass obj_class = Scene.v().getSootClass("java.lang.Object");
    HierarchyGraph hgraph = class_hierarchy.getHierarchyGraph();
    Set<Integer> roots = hgraph.getChildren(0);   //java.lang.Object is 0
   
    for(Integer root : roots){   
      String root_name = StringNumbers.v().getString(root);
      SootClass root_class = Scene.v().getSootClass(root_name);
      if(root_class.isInterface()){
        continue;
      }
     
      OpenCLClass ocl_class = OpenCLScene.v().getOpenCLClass(root_class);
      TreeNode tree_node = new TreeNode(root_class, ocl_class);
     
      LinkedList<TreeNode> queue = new LinkedList<TreeNode>();
      queue.add(tree_node);
      all_tree_nodes.add(tree_node);
     
      while(queue.isEmpty() == false){
        TreeNode curr = queue.removeFirst();
        SootClass soot_class = curr.getSootClass();
        int num = StringNumbers.v().addString(soot_class.getName());
       
        Set<Integer> children = hgraph.getChildren(num);
        for(Integer child : children){
          String child_str = StringNumbers.v().getString(child);
          SootClass child_class = Scene.v().getSootClass(child_str);
          if(child_class.isInterface()){
            continue;
View Full Code Here

TOP

Related Classes of soot.rbclassload.HierarchyGraph

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.