Package org.apache.bcel.generic

Examples of org.apache.bcel.generic.InstructionFactory.createNew()


            } else if (type instanceof ReferenceType) {
                insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(Type.OBJECT), Type.VOID, new Type[]{Type.OBJECT}, Constants.INVOKEVIRTUAL));
            }
        }
        // create uninitialzed object
        insList.append(insFactory.createNew(objecttype));
        insList.append(InstructionFactory.createDup(objecttype.getSize()));
        // return the arguments into the stack
        for (int i = 0; i < arguments.length; i++) {
            Type type = arguments[i];
            insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
View Full Code Here


        // if not continuation exists, create empty stack
        insList.insert(new GOTO(firstIns));
        insList.insert(InstructionFactory.createStore(STACK_TYPE, method.getMaxLocals()+1));
        insList.insert(insFactory.createInvoke(STACK_CLASS, Constants.CONSTRUCTOR_NAME, Type.VOID, Type.NO_ARGS, Constants. INVOKESPECIAL));
        insList.insert(InstructionFactory.createDup(STACK_TYPE.getSize()));
        insList.insert(insFactory.createNew(STACK_TYPE));

        // test if no current continuation exists
        insList.insert(new IFNONNULL(restore_handle));
        insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));
View Full Code Here

            } else if (type instanceof ReferenceType) {
                insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(Type.OBJECT), Type.VOID, new Type[]{Type.OBJECT}, Constants.INVOKEVIRTUAL));
            }
        }
        // create uninitialzed object
        insList.append(insFactory.createNew(objecttype));
        insList.append(InstructionFactory.createDup(objecttype.getSize()));
        // return the arguments into the stack
        for (int i = 0; i < arguments.length; i++) {
            Type type = arguments[i];
            insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
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.