本文整理了Java中org.objectweb.asm.tree.MethodInsnNode.setOpcode()
方法的一些代码示例,展示了MethodInsnNode.setOpcode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MethodInsnNode.setOpcode()
方法的具体详情如下:
包路径:org.objectweb.asm.tree.MethodInsnNode
类名称:MethodInsnNode
方法名:setOpcode
[英]Sets the opcode of this instruction.
[中]设置此指令的操作码。
代码示例来源:origin: org.parboiled/parboiled-java
private void process(ParserClassNode classNode, RuleMethod method, MethodInsnNode insn) {
if ("<init>".equals(insn.name)) return;
String superMethodName = getSuperMethodName(method, insn);
RuleMethod superMethod = classNode.getRuleMethods().get(superMethodName.concat(insn.desc));
if (superMethod == null) return;
if (!superMethod.isBodyRewritten()) return;
// since the super method is rewritten we do need to generate it
superMethod.dontSkipGeneration();
// we have a call to a super method that was rewritten, so we need to change the call to the generated method
insn.setOpcode(INVOKEVIRTUAL);
insn.name = superMethodName;
insn.owner = classNode.name;
method.setBodyRewritten();
}
代码示例来源:origin: SleepyTrousers/EnderCore
call.owner = targetType.getInternalName();
if (call.getOpcode() == INVOKEINTERFACE) {
call.setOpcode(INVOKEVIRTUAL);
call.itf = false;
代码示例来源:origin: fge/grappa
private void process(final ParserClassNode classNode,
final RuleMethod method, final MethodInsnNode insn)
{
if ("<init>".equals(insn.name))
return;
final String superMethodName = getSuperMethodName(method, insn);
final RuleMethod superMethod = classNode.getRuleMethods()
.get(superMethodName + insn.desc);
if (superMethod == null)
return;
if (!superMethod.isBodyRewritten())
return;
// since the super method is rewritten we do need to generate it
superMethod.dontSkipGeneration();
// we have a call to a super method that was rewritten, so we need to
// change the call to the generated method
insn.setOpcode(INVOKEVIRTUAL);
insn.name = superMethodName;
insn.owner = classNode.name;
method.setBodyRewritten();
}
代码示例来源:origin: EvoSuite/evosuite
if(Modifier.isFinal(method.getModifiers())) {
if(methodInsnNode.getOpcode() != Opcodes.INVOKESTATIC) {
methodInsnNode.setOpcode(Opcodes.INVOKESTATIC);
Type[] args = Type.getArgumentTypes(methodInsnNode.desc);
Type returnType = Type.getReturnType(methodInsnNode.desc);
代码示例来源:origin: inesc-id-esw/jvstm
methodInstr.setOpcode(INVOKESTATIC);
methodInstr.name = methodInstr.name + "$static$callable$creator";
for (MethodNode staticCreated : staticMethodsToAdd) {
代码示例来源:origin: Glitchfiend/SereneSeasons
targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC);
targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper";
targetMethodInsnNode.name = "shouldRenderRainSnow";
targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC);
targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper";
targetMethodInsnNode.name = "getFloatTemperature";
targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC);
targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper";
targetMethodInsnNode.name = "shouldAddRainParticles";
targetMethodInsnNode.setOpcode(Opcodes.INVOKESTATIC);
targetMethodInsnNode.owner = "sereneseasons/season/SeasonASMHelper";
targetMethodInsnNode.name = "getFloatTemperature";
内容来源于网络,如有侵权,请联系作者删除!