soot.Body.getLocalVariables()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(174)

本文整理了Java中soot.Body.getLocalVariables()方法的一些代码示例,展示了Body.getLocalVariables()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Body.getLocalVariables()方法的具体详情如下:
包路径:soot.Body
类名称:Body
方法名:getLocalVariables

Body.getLocalVariables介绍

暂无

代码示例

代码示例来源:origin: com.bugvm/bugvm-soot

public void validateLocalVariables()
{
  Iterator<LocalVariable> it = getLocalVariables().iterator();
  while (it.hasNext())
  {
    LocalVariable lv = it.next();
    if (!unitChain.contains(lv.getStartUnit()))
      throw new RuntimeException("start not in chain"+" in "+getMethod());
    if (lv.getEndUnit() != null && !unitChain.contains(lv.getEndUnit()))
      throw new RuntimeException("end not in chain"+" in "+getMethod());
  }
}

代码示例来源:origin: ibinti/bugvm

public void validateLocalVariables()
{
  Iterator<LocalVariable> it = getLocalVariables().iterator();
  while (it.hasNext())
  {
    LocalVariable lv = it.next();
    if (!unitChain.contains(lv.getStartUnit()))
      throw new RuntimeException("start not in chain"+" in "+getMethod());
    if (lv.getEndUnit() != null && !unitChain.contains(lv.getEndUnit()))
      throw new RuntimeException("end not in chain"+" in "+getMethod());
  }
}

代码示例来源:origin: ibinti/bugvm

/**
   * Finds a {@link LocalVariable} with the specified local variable index
   * at the specified {@link Unit} or {@code null} if none was found.
   * RoboVM note: Added in RoboVM.
   */
  private LocalVariable findLocalVariable(Body body, int index, Unit unit) {
    PatchingChain<Unit> units = body.getUnits();
    for (LocalVariable lv : body.getLocalVariables()) {
      if (lv.getIndex() == index) {
        if ((unit == lv.getStartUnit() || units.follows(unit, lv.getStartUnit()))
            && (lv.getEndUnit() == null || units.follows(lv.getEndUnit(), unit))) {
          return lv;
        }
      }
    }
    return null;
  }
}

代码示例来源:origin: com.bugvm/bugvm-soot

/**
   * Finds a {@link LocalVariable} with the specified local variable index
   * at the specified {@link Unit} or {@code null} if none was found.
   * RoboVM note: Added in RoboVM.
   */
  private LocalVariable findLocalVariable(Body body, int index, Unit unit) {
    PatchingChain<Unit> units = body.getUnits();
    for (LocalVariable lv : body.getLocalVariables()) {
      if (lv.getIndex() == index) {
        if ((unit == lv.getStartUnit() || units.follows(unit, lv.getStartUnit()))
            && (lv.getEndUnit() == null || units.follows(lv.getEndUnit(), unit))) {
          return lv;
        }
      }
    }
    return null;
  }
}

代码示例来源:origin: ibinti/bugvm

Iterator lvsIt = body.getLocalVariables().iterator();

代码示例来源:origin: com.bugvm/bugvm-soot

Iterator lvsIt = body.getLocalVariables().iterator();

相关文章