Package soot.rbclassload

Examples of soot.rbclassload.FieldSignatureUtil


    Set<SootField> fields = RootbeerClassLoader.v().getDfsInfo().getFields();
    for(SootField field : fields){
      addField(field);
    }

    FieldSignatureUtil field_util = new FieldSignatureUtil();
    ForcedFields forced_fields = new ForcedFields();
    for(String field_sig : forced_fields.get()){
      field_util.parse(field_sig);
      addField(field_util.getSootField());
    }
   
    Set<ArrayType> array_types = RootbeerClassLoader.v().getDfsInfo().getArrayTypes();
    for(ArrayType array_type : array_types){
      OpenCLArrayType ocl_array_type = new OpenCLArrayType(array_type);
View Full Code Here


      return;
    }
    visited.add(signature);
       
    StringToType converter = new StringToType();
    FieldSignatureUtil futil = new FieldSignatureUtil();
   
    //load all virtual methods to be followed
    ClassHierarchy class_hierarchy = RootbeerClassLoader.v().getClassHierarchy();
    List<HierarchySignature> virt_methods = class_hierarchy.getVirtualMethods(signature);
    for(HierarchySignature virt_method : virt_methods){
      if(virt_method.equals(signature) == false){
        queue.add(virt_method);
      }
    }

    //if we should follow into method, don't
    if(RootbeerClassLoader.v().dontFollow(signature)){
      return;
    }
   
    m_currDfsInfo.addType(signature.getClassName());
    m_currDfsInfo.addType(signature.getReturnType());
    m_currDfsInfo.addMethod(signature.toString());
   
    //go into the method
    HierarchyValueSwitch value_switch = RootbeerClassLoader.v().getValueSwitch(signature);
    for(Integer num : value_switch.getAllTypesInteger()){
      String type_str = StringNumbers.v().getString(num);
      Type type = converter.convert(type_str);
      m_currDfsInfo.addType(type);
    }   

    for(HierarchySignature method_sig : value_switch.getMethodRefsHierarchy()){
      m_currDfsInfo.addMethod(signature.toString());
      queue.add(method_sig);
    }

    for(String field_ref : value_switch.getFieldRefs()){
      futil.parse(field_ref);
      SootField soot_field = futil.getSootField();
      m_currDfsInfo.addField(soot_field);
    }

    for(Integer num : value_switch.getInstanceOfsInteger()){
      String type_str = StringNumbers.v().getString(num);
View Full Code Here

    List<CompositeField> fields = OpenCLScene.v().getCompositeFields();
    for(CompositeField field : fields){
      set.addAll(getFieldPrototypes(field));
    }
    // Force fields to be generated
    FieldSignatureUtil util = new FieldSignatureUtil();
    ForcedFields forced_fields = new ForcedFields();
    for(String field_sig : forced_fields.get()){
      util.parse(field_sig);
      OpenCLClass field_class = classes.get(util.getDeclaringClass());
      OpenCLField field = field_class.getField(util.getName());
      String prototype = field.getGetterSetterPrototypes();
      if (!set.contains(prototype)) {
        set.add(prototype);
        m_fieldsToForce.add(field_sig);
      }
View Full Code Here

    List<CompositeField> fields = OpenCLScene.v().getCompositeFields();
    for(CompositeField field : fields){
      set.addAll(getFieldBodies(field));
    }
    // Force fields to be generated
    FieldSignatureUtil util = new FieldSignatureUtil();
    for(String field_sig : m_fieldsToForce){
      util.parse(field_sig);
      OpenCLClass field_class = classes.get(util.getDeclaringClass());
      OpenCLField field = field_class.getField(util.getName());
      CompositeField composite = new CompositeField();
      SootField soot_field = util.getSootField();
      if(soot_field.getType() instanceof RefType){
        composite.addRefField(field, soot_field.getDeclaringClass());
      } else {
        composite.addNonRefField(field, soot_field.getDeclaringClass());
      }
View Full Code Here

  public SootField getSootField(){
    return m_sootField;
  }

  private String getFullName(){
    FieldSignatureUtil util = new FieldSignatureUtil();
    util.parse(m_sootField.getSignature());
    SootField real_field = util.getSootField();
    OpenCLClass ocl_class = OpenCLScene.v().getOpenCLClass(real_field.getDeclaringClass());
    return ocl_class.getName()+"_"+getName();
  }
View Full Code Here

TOP

Related Classes of soot.rbclassload.FieldSignatureUtil

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.