Package org.apache.bcel.util

Examples of org.apache.bcel.util.InstructionFinder.search()


            }
        }
               
        // ALOAD_N ALOAD_N => ALOAD_N DUP
  pattern = "ALOAD ALOAD";
        for (Iterator iter = find.search(pattern); iter.hasNext();) {
            InstructionHandle[] match = (InstructionHandle[])iter.next();
            try {
                if (!match[1].hasTargeters()) {
                    org.apache.bcel.generic.ALOAD aload1 =
                        (org.apache.bcel.generic.ALOAD) match[0].getInstruction();
View Full Code Here


        InstructionList il = mg.getInstructionList();
        InstructionFinder f   = new InstructionFinder(il);
        String            pat = "ALOAD_0 ALOAD_1 PUTFIELD ALOAD_0 INVOKESPECIAL";

        boolean changed = false;
        for(Iterator j = f.search(pat, new IsInnerConstructor()); j.hasNext(); )
        {
            InstructionHandle[] match = (InstructionHandle[]) j.next();

            // replace
            //    ALOAD_0       [0]
View Full Code Here

        InstructionList il = mg.getInstructionList();
        InstructionFinder f   = new InstructionFinder(il);
        String            pat = "[LDC_W|LDC] INVOKEVIRTUAL IFNE ICONST_1 GOTO ICONST_0";

        boolean changed = false;
        for(Iterator j = f.search(pat, new IsLdcClass()); j.hasNext(); )
        {
            InstructionHandle[] match = (InstructionHandle[]) j.next();

            // replace
            //    LDC_W <class>
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.