org.objectweb.asm.tree.InsnList.getFirst()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(116)

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

InsnList.getFirst介绍

[英]Returns the first instruction in this list.
[中]返回此列表中的第一条指令。

代码示例

代码示例来源:origin: pxb1988/dex2jar

private void cleanDebug(MethodNode mn) {
  for (AbstractInsnNode p = mn.instructions.getFirst(); p != null; ) {
    if (p.getType() == AbstractInsnNode.LINE) {
      AbstractInsnNode q = p.getNext();
      mn.instructions.remove(p);
      p = q;
    } else {
      p = p.getNext();
    }
  }
  mn.localVariables = null;
}

代码示例来源:origin: pxb1988/dex2jar

AbstractInsnNode p = m.instructions.getFirst();
while (p != null) {
  if (p.getOpcode() == Opcodes.INVOKESTATIC) {

代码示例来源:origin: pxb1988/dex2jar

for (AbstractInsnNode p = m.instructions.getFirst(); p != null; p = p.getNext()) {
  if (p.getOpcode() == Opcodes.INVOKESTATIC) {
    MethodInsnNode mn = (MethodInsnNode) p;

代码示例来源:origin: Sable/soot

private void emitUnits() {
 AbstractInsnNode insn = instructions.getFirst();
 ArrayDeque<LabelNode> labls = new ArrayDeque<LabelNode>();

代码示例来源:origin: pxb1988/dex2jar

stack.push(insnList.getFirst());

代码示例来源:origin: Sable/soot

worklist.add(new Edge(instructions.getFirst(), new ArrayList<Operand>()));
conversionWorklist = worklist;
edges = HashBasedTable.create(1, 1);

代码示例来源:origin: pxb1988/dex2jar

private void initParentCount(int[] parentCount) {
  parentCount[0] = 1;
  for (AbstractInsnNode p = insnList.getFirst(); p != null; p = p.getNext()) {
    if (p.getType() == AbstractInsnNode.JUMP_INSN) {
      JumpInsnNode jump = (JumpInsnNode) p;

代码示例来源:origin: org.jacoco/org.jacoco.core

private boolean hasLineNumber(final MethodNode methodNode) {
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    if (AbstractInsnNode.LINE == i.getType()) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  AbstractInsnNode i = methodNode.instructions.getFirst();
  while (i != null) {
    filter(i, output);
    i = i.getNext();
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  if (ENUM_TYPE.equals(context.getSuperClassName())
      && CONSTRUCTOR_NAME.equals(methodNode.name)
      && CONSTRUCTOR_DESC.equals(methodNode.desc)
      && new Matcher().match(methodNode)) {
    output.ignore(methodNode.instructions.getFirst(),
        methodNode.instructions.getLast());
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  if ((methodNode.access & Opcodes.ACC_PRIVATE) != 0
      && CONSTRUCTOR_NAME.equals(methodNode.name)
      && CONSTRUCTOR_DESC.equals(methodNode.desc) && new Matcher()
          .match(methodNode, context.getSuperClassName())) {
    output.ignore(methodNode.instructions.getFirst(),
        methodNode.instructions.getLast());
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  final Matcher matcher = new Matcher();
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    matcher.match(i, output);
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  final Matcher matcher = new Matcher();
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    matcher.match(i, output);
  }
}

代码示例来源:origin: nuls-io/nuls

public Frame(VM vm, MethodCode methodCode, Object[] args) {
  this.vm = vm;
  this.heap = vm.heap;
  this.methodArea = vm.methodArea;
  this.methodCode = methodCode;
  this.maxStack = this.methodCode.maxStack;
  this.maxLocals = this.methodCode.maxLocals;
  this.operandStack = new OperandStack(this.maxStack);
  this.localVariables = new LocalVariables(this.maxLocals, args);
  this.result = new Result(this.methodCode.returnVariableType);
  this.currentInsnNode = this.methodCode.instructions.getFirst();
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  final Matcher matcher = new Matcher();
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    matcher.match(i, output);
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  final Matcher matcher = new Matcher();
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    matcher.match(i, output);
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  final Matcher matcher = new Matcher();
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    matcher.match(i, output);
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  final Matcher matcher = new Matcher();
  for (AbstractInsnNode i = methodNode.instructions
      .getFirst(); i != null; i = i.getNext()) {
    matcher.match(i, output);
  }
}

代码示例来源:origin: org.jacoco/org.jacoco.core

public void filter(final MethodNode methodNode,
    final IFilterContext context, final IFilterOutput output) {
  if (isMethodFiltered(context.getClassName(),
      context.getSuperClassName(), methodNode.name,
      methodNode.desc)) {
    output.ignore(methodNode.instructions.getFirst(),
        methodNode.instructions.getLast());
  }
}

代码示例来源:origin: org.parboiled/parboiled-java

public void process(ParserClassNode classNode, RuleMethod method) throws Exception {
  checkArgNotNull(classNode, "classNode");
  checkArgNotNull(method, "method");
  InsnList instructions = method.instructions;
  AbstractInsnNode insn = instructions.getFirst();
  while (insn.getOpcode() != ARETURN) {
    if (insn.getOpcode() == INVOKESPECIAL) {
      process(classNode, method, (MethodInsnNode) insn);
    }
    insn = insn.getNext();
  }
}

相关文章