Package soot.rbclassload

Examples of soot.rbclassload.MethodSignatureUtil


import soot.rbclassload.RootbeerClassLoader;

public class ConcreteMethods {

  public List<String> get(String signature){
    MethodSignatureUtil util = new MethodSignatureUtil();
   
    ClassHierarchy class_hierarchy = RootbeerClassLoader.v().getClassHierarchy();
    List<String> virtual_methods = class_hierarchy.getVirtualMethods(signature);
   
    List<String> ret = new ArrayList<String>();
    for(String virt_method : virtual_methods){
      util.parse(virt_method);
      SootMethod method = util.getSootMethod();
      if(method.isAbstract() == false){
        ret.add(virt_method);
      }
    }
   
View Full Code Here


  private Set<MethodHierarchy> m_hierarchies;
  private MethodSignatureUtil m_util;
 
  public MethodHierarchies(){
    m_hierarchies = new LinkedHashSet<MethodHierarchy>();
    m_util = new MethodSignatureUtil();
  }
View Full Code Here

    } else {
      ConcreteMethods concrete_method_finder = new ConcreteMethods();
      List<String> concrete_methods = concrete_method_finder.get(m_sootMethod.getSignature());
      if(concrete_methods.size() == 1){
        String method = concrete_methods.get(0);
        MethodSignatureUtil util = new MethodSignatureUtil();
        util.parse(method);
        return util.getSootMethod();
      } else {
        return m_sootMethod;
      }
    }
  }
View Full Code Here

    m_dontEmitMethods = setup.getDontEmit();
    m_emitUnmangled = setup.getEmitUnmanged();  
  }

  public String getSignature() {
    MethodSignatureUtil util = new MethodSignatureUtil();
    util.parse(m_sootMethod.getSignature());
    util.setClassName(m_sootClass.getName());
    return util.getSignature();
  }
View Full Code Here

 
  private SootMethod m_baseMethod;
  private MethodSignatureUtil m_util;
 
  public IsPolymorphic(){
    m_util = new MethodSignatureUtil();
  }
View Full Code Here

    return ret;
  }
 
  private void loadTypes(){
    Set<String> methods = RootbeerClassLoader.v().getDfsInfo().getMethods()
    MethodSignatureUtil util = new MethodSignatureUtil();
    for(String method_sig : methods){
      util.parse(method_sig);
      SootMethod method = util.getSootMethod();
      addMethod(method);
    }
    CompilerSetup compiler_setup = new CompilerSetup();
    for(String extra_method : compiler_setup.getExtraMethods()){
      util.parse(extra_method);
      addMethod(util.getSootMethod());
    }
   
    Set<SootField> fields = RootbeerClassLoader.v().getDfsInfo().getFields();
    for(SootField field : fields){
      addField(field);
View Full Code Here

 
  private Set<String> m_extraMethods;

  public OpenCLPolymorphicMethod(SootMethod soot_method){
    m_sootMethod = soot_method;
    m_util = new MethodSignatureUtil();
   
    m_extraMethods = new HashSet<String>();
    m_extraMethods.add("<java.lang.Object: int hashCode()>");
  }
View Full Code Here

  public void pushMethod(String class_name, String method_name, Type return_type, Type... arg_types){
    SootClass soot_class = Scene.v().getSootClass(class_name);
    SootClass org_class = soot_class;
   
    TypeToString converter = new TypeToString();
    MethodSignatureUtil util = new MethodSignatureUtil();
    util.setClassName(class_name);
    util.setMethodName(method_name);
    util.setReturnType(converter.convert(return_type));
    List<String> parameter_types = new ArrayList<String>();
    for(Type arg_type : arg_types){
      parameter_types.add(converter.convert(arg_type));
    }
    util.setParameterTypes(parameter_types);
    SootMethod soot_method = util.getSootMethod();
    m_methodStack.push(soot_method);
  }
View Full Code Here

TOP

Related Classes of soot.rbclassload.MethodSignatureUtil

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.