本文整理了Java中org.objectweb.asm.tree.AbstractInsnNode.getNext()
方法的一些代码示例,展示了AbstractInsnNode.getNext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractInsnNode.getNext()
方法的具体详情如下:
包路径:org.objectweb.asm.tree.AbstractInsnNode
类名称:AbstractInsnNode
方法名:getNext
[英]Returns the next instruction in the list to which this instruction belongs, if any.
[中]返回此指令所属列表中的下一条指令(如果有)。
代码示例来源: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: jooby-project/jooby
public static List<LdcInsnNode> ldcFor(MethodInsnNode node) {
AbstractInsnNode it = new Insn<>(null, node.getPrevious())
.prev()
.filter(is(MethodInsnNode.class))
.findFirst()
.orElseGet(() -> Insn.first(node));
/** Collect all ldc between a previous method invocation and current invocation: */
List<LdcInsnNode> ldc = new ArrayList<>();
while (it != node) {
if (it instanceof LdcInsnNode) {
ldc.add((LdcInsnNode) it);
}
it = it.getNext();
}
return ldc;
}
}
代码示例来源:origin: pxb1988/dex2jar
p = p.getNext();
代码示例来源:origin: linkedin/parseq
static String getDescriptionForTypeInsnNode(TypeInsnNode typeInsnNode) {
AbstractInsnNode nextInsn = typeInsnNode.getNext();
StringJoiner argsDesc = new StringJoiner(",", "(", ")");
while (nextInsn != null) {
if (nextInsn instanceof LdcInsnNode) {
argsDesc.add("_");
} else if (nextInsn.getOpcode() == Opcodes.DUP) {
//ignore
} else {
break;
}
nextInsn = nextInsn.getNext();
}
if (typeInsnNode.getOpcode() == Opcodes.NEW) {
return "new " + Util.extractSimpleName(typeInsnNode.desc, "/") + argsDesc.toString();
}
return "";
}
}
代码示例来源: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;
AbstractInsnNode next = p.getNext();
if(next!=null) {
parentCount[insnList.indexOf(p.getNext())]++;
代码示例来源:origin: pxb1988/dex2jar
for (AbstractInsnNode p = m.instructions.getFirst(); p != null; p = p.getNext()) {
if (p.getOpcode() == Opcodes.INVOKESTATIC) {
MethodInsnNode mn = (MethodInsnNode) p;
代码示例来源:origin: jooby-project/jooby
private List<RouteParameter> params(final ClassLoader loader, final ClassNode owner,
final String pattern, final MethodNode lambda) {
List<RouteParameter> result = new ArrayList<>();
new Insns(lambda)
.on(param(loader), it -> {
String name = parameterName(it.node)
.orElse("arg" + result.size());
AbstractInsnNode next = it.node.getNext();
Object value = paramValue(loader, owner, lambda, next);
if (value != next) {
// there is a default value, move next
next = next.getNext();
} else {
value = null;
}
java.lang.reflect.Type parameterType = parameterType(loader, next);
// boolean are ICONST_0 or ICONST_1
if (boolean.class.equals(parameterType) && Integer.class.isInstance(value)) {
value = (((Integer) value)).intValue() == 1;
}
result.add(new RouteParameter(name, kind(pattern, it.node.name, name),
simplifyType(parameterType), value));
}).forEach();
return result;
}
代码示例来源:origin: Sable/soot
insn = insn.getNext();
continue;
insn = insn.getNext();
代码示例来源:origin: jooby-project/jooby
AbstractInsnNode next = n.getNext();
if (next instanceof MethodInsnNode) {
if (((MethodInsnNode) next).name.equals("toOptional")) {
代码示例来源:origin: pxb1988/dex2jar
stack.push(p.getNext());
merge(tmp, index + 1);
代码示例来源:origin: pxb1988/dex2jar
handlers.set(handlerIdx);
for (AbstractInsnNode p = tcb.start.getNext(); p != tcb.end; p = p.getNext()) {
代码示例来源:origin: Sable/soot
AbstractInsnNode next = insn.getNext();
addEdges(insn, next, Collections.singletonList(jmp.label));
} else {
throw new RuntimeException("Unknown instruction type: " + type);
} while ((insn = insn.getNext()) != null);
} while (!worklist.isEmpty());
conversionWorklist = null;
代码示例来源:origin: nuls-io/nuls
public void step() {
if (this.currentInsnNode != null) {
this.currentInsnNode = this.currentInsnNode.getNext();
}
}
代码示例来源:origin: org.jacoco/org.jacoco.core
public void ignore(final AbstractInsnNode fromInclusive,
final AbstractInsnNode toInclusive) {
for (AbstractInsnNode i = fromInclusive; i != toInclusive; i = i
.getNext()) {
ignored.add(i);
}
ignored.add(toInclusive);
}
代码示例来源:origin: ItzSomebody/Radon
public static AbstractInsnNode getNext(AbstractInsnNode node) {
AbstractInsnNode next = node.getNext();
while (!isInstruction(next)) {
next = next.getNext();
}
return next;
}
代码示例来源: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.apache.drill.exec/drill-java-exec
@Override
public void accept(final MethodVisitor mv) {
currentInsn = inner.getFirst();
while (currentInsn != null) {
currentFrame = frames[index];
nextFrame = index + 1 < frames.length ? frames[index + 1] : null;
currentInsn.accept(mv);
currentInsn = currentInsn.getNext();
index++;
}
}
代码示例来源: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
private static AbstractInsnNode next(AbstractInsnNode i) {
do {
i = i.getNext();
} while (i != null && (AbstractInsnNode.FRAME == i.getType()
|| AbstractInsnNode.LABEL == i.getType()
|| AbstractInsnNode.LINE == i.getType()));
return i;
}
代码示例来源: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();
}
}
内容来源于网络,如有侵权,请联系作者删除!