Package org.objectweb.asm.tree

Examples of org.objectweb.asm.tree.InsnNode


        return this;
    }

    public MethodDefinition ret()
    {
        instructionList.add(new InsnNode(RETURN));
        return this;
    }
View Full Code Here


        return this;
    }

    public MethodDefinition retObject()
    {
        instructionList.add(new InsnNode(ARETURN));
        return this;
    }
View Full Code Here

        return this;
    }

    public MethodDefinition throwException()
    {
        instructionList.add(new InsnNode(ATHROW));
        return this;
    }
View Full Code Here

        return this;
    }

    public MethodDefinition dup()
    {
        instructionList.add(new InsnNode(DUP));
        return this;
    }
View Full Code Here

        return this;
    }

    public MethodDefinition pop()
    {
        instructionList.add(new InsnNode(POP));
        return this;
    }
View Full Code Here

        return this;
    }

    public MethodDefinition swap()
    {
        instructionList.add(new InsnNode(SWAP));
        return this;
    }
View Full Code Here

        return this;
    }

    public MethodDefinition loadNull()
    {
        instructionList.add(new InsnNode(ACONST_NULL));
        return this;
    }
View Full Code Here

    public MethodDefinition loadConstant(int value)
    {
        switch (value) {
            case -1:
                instructionList.add(new InsnNode(ICONST_M1));
                break;
            case 0:
                instructionList.add(new InsnNode(ICONST_0));
                break;
            case 1:
                instructionList.add(new InsnNode(ICONST_1));
                break;
            case 2:
                instructionList.add(new InsnNode(ICONST_2));
                break;
            case 3:
                instructionList.add(new InsnNode(ICONST_3));
                break;
            case 4:
                instructionList.add(new InsnNode(ICONST_4));
                break;
            case 5:
                instructionList.add(new InsnNode(ICONST_5));
                break;
            default:
                instructionList.add(new LdcInsnNode(value));
                break;
        }
View Full Code Here

                case 'B':
                case 'Z':
                case 'S':
                case 'C':
                case 'I':
                    instructionList.add(new InsnNode(ICONST_0));
                    break;
                case 'F':
                    instructionList.add(new InsnNode(FCONST_0));
                    break;
                case 'D':
                    instructionList.add(new InsnNode(DCONST_0));
                    break;
                case 'J':
                    instructionList.add(new InsnNode(LCONST_0));
                    break;
                default:
                    checkArgument(false, "Unknown type '%s'", variable.getType());
            }
        }
        else {
            instructionList.add(new InsnNode(ACONST_NULL));
        }

        instructionList.add(new VarInsnNode(Type.getType(type.getType()).getOpcode(ISTORE), variable.getSlot()));

        return this;
View Full Code Here

    frame(expected.getVisitor());
  }

  @Test
  public void testInsn() {
    testInstructionBetweenFrames(new InsnNode(Opcodes.NOP));
  }
View Full Code Here

TOP

Related Classes of org.objectweb.asm.tree.InsnNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.