Package soot

Examples of soot.SootField


     
      if(lhs instanceof FieldRef == false)
        continue;
       
      FieldRef ref = (FieldRef) lhs;
      SootField field = ref.getField();
      String name = field.getDeclaringClass().getName();
      if(m_WrittenClasses.contains(name) == false)
        m_WrittenClasses.add(name);
    }
  }
View Full Code Here


      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

    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());
      }
      set.add(field.getGetterSetterBodies(composite, true, m_TypeSwitch));
    }
    return setToString(set);
  }
View Full Code Here

  }
 
  private void processNodeField(TreeNode node, OpenCLField field, boolean ref_field, CompositeField composite){
   
    SootClass soot_class = node.getSootClass();   
    SootField soot_field = field.getSootField();
   
    OpenCLField new_field = new OpenCLField(soot_field, soot_class);
   
    if(isCloned(soot_class, soot_field)){
      new_field.setClone(field);
    } else {
      soot_field = soot_class.getFieldByName(soot_field.getName());
      new_field = new OpenCLField(soot_field, soot_class);
      field = new_field;
    }
   
    String hash = soot_field.toString();
    if(m_processNodeVisited.contains(hash) == false){
      m_processNodeVisited.add(hash);
      if(ref_field){
        composite.addRefField(new_field, soot_class);
      } else {
        composite.addNonRefField(new_field, soot_class);
      }
    }
   
    if(soot_field.isPrivate() == false){
      for(TreeNode child : node.getChildren()){
        processNodeField(child, field, ref_field, composite);
      }
    }
  }
View Full Code Here

  }

  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

      } else if(decl instanceof FieldDeclaration) {
        VarDecl vd = ((FieldDeclaration)decl).getVarDecl();
        String fieldName = vd.getName();
        Type fieldType = SootTypeUtil.getSootType(vd.getTypeName().getDescriptor());
        int fieldModifiers = getModifiers(decl);
        SootField sootField = new SootField(fieldName, fieldType, fieldModifiers);
        klass.addField(sootField);
      }
    }
   
    return klass;
View Full Code Here

  public void caseAssignStmt(AssignStmt stmt) {
    Value lvalue = stmt.getLeftOp();
    ValueBox rbox = stmt.getRightOpBox();
    if (lvalue instanceof JInstanceFieldRef) {
      JInstanceFieldRef ref = (JInstanceFieldRef)lvalue;
      SootField field = ref.getField();
      if (fieldAutomatonMap.containsKey(field)) {
        Automaton automaton = fieldAutomatonMap.get(field);
        createHotspot(stmt, rbox, automaton);
      }
    }
View Full Code Here

        // ignore..
      }

    } else if (s.getLeftOp() instanceof FieldRef) {
      // A.field = B
      SootField sootField = ((FieldRef)s.getLeftOp()).getField();
      Variable field = context.getField(sootField);
      checkTypeAnnotation(context.getFieldSchemaType(sootField), right);
      cfg.startBranch();
      cfg.addStatement(new VarStm(field, right, context.getCurrentOrigin()));
      cfg.useBranch();
View Full Code Here

TOP

Related Classes of soot.SootField

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.