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

x33g5p2x  于11个月前 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(28)

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

AbstractInsnNode.clone介绍

[英]Returns the clones of the given labels.
[中]返回给定标签的克隆。

代码示例

代码示例来源:origin: kilim/kilim

flow.setLabel(newPos, l);
extraInsns.add(instructions.get(i).clone(labelCopyMap));

代码示例来源:origin: co.paralleluniverse/quasar

@Override
  public AbstractInsnNode clone(Map labels) {
    return new OmittedInstruction(orgInsn.clone(labels));
  }
}

代码示例来源:origin: org.ow2.asm/asm-debug-all

newInstructions.add(insn.clone(instant));

代码示例来源:origin: jpcsp/jpcsp

case Opcodes.ATHROW:
  method.instructions.set(insn, target.clone(null));

代码示例来源:origin: org.multiverse/multiverse-alpha-unborn

AbstractInsnNode cloned = donorInsn.clone(cloneMap);
  result.instructions.add(cloned);
  AbstractInsnNode cloned = donorInsn.clone(cloneMap);
  result.instructions.add(cloned);
      GETSTATIC, classNode.name, txFactoryFieldNode.name, donorFieldInsnNode.desc));
} else {
  result.instructions.add(donorInsn.clone(cloneMap));
AbstractInsnNode cloned = donorInsn.clone(cloneMap);
result.instructions.add(cloned);
break;

代码示例来源:origin: org.ow2.asm/asm-commons

newInstructions.add(insnNode.clone(instantiation));

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

newInstructions.add(insnNode.clone(instantiation));

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

newInstructions.add(insnNode.clone(instantiation));

代码示例来源:origin: org.activecomponents.jadex/jadex-kernel-bdiv3

while(!cur.equals(min))
  AbstractInsnNode clone = cur.clone(labels);
  mnode.instructions.add(clone);
  cur = cur.getNext();
mnode.instructions.add(cur.clone(labels));
mnode.visitInsn(Opcodes.RETURN);

代码示例来源:origin: org.multiverse/multiverse-alpha-unborn

instructions.add(originalInsn.clone(cloneMap));
if (!fieldMetadata.hasFieldGranularity()) {
  instructions.add(originalInsn.clone(cloneMap));
} else {
instructions.add(originalInsn.clone(cloneMap));
break;

代码示例来源:origin: org.multiverse/multiverse-alpha-unborn

private MethodNode transform(MethodNode originalMethodNode) {
  MethodMetadata methodMetadata = classMetadata.getMethodMetadata(
      originalMethodNode.name, originalMethodNode.desc);
  if (skipMethod(methodMetadata)) {
    return originalMethodNode;
  }
  CloneMap cloneMap = new CloneMap();
  MethodNode result = cloneMethodWithoutInstructions(originalMethodNode, cloneMap);
  InsnList newInstructions = new InsnList();
  for (int k = 0; k < originalMethodNode.instructions.size(); k++) {
    AbstractInsnNode originalInsn = originalMethodNode.instructions.get(k);
    switch (originalInsn.getOpcode()) {
      case INVOKEVIRTUAL:
      case INVOKESPECIAL:
        AbstractInsnNode fixedInsn = optimizeInvoke((MethodInsnNode) originalInsn, cloneMap);
        newInstructions.add(fixedInsn);
        break;
      default:
        newInstructions.add(originalInsn.clone(cloneMap));
        break;
    }
  }
  result.instructions = newInstructions;
  return result;
}

代码示例来源:origin: org.multiverse/multiverse-alpha-unborn

case -1:
  if (!(originalInsn instanceof FrameNode)) {
    newInsn = originalInsn.clone(cloneMap);
    newInsn = originalInsn.clone(cloneMap);
  } else {
    Frame methodFrame = frames[methodNode.instructions.indexOf(originalFieldInsnNode)];
    newInsn = originalInsn.clone(cloneMap);
  } else {
    Frame methodFrame = frames[methodNode.instructions.indexOf(originalFieldInsnNode)];
    newInsn = originalInsn.clone(cloneMap);
  newInsn = originalInsn.clone(cloneMap);
  break;

相关文章