Package org.apache.bcel.generic

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


        insList.insert(new IFNONNULL(restore_handle));
        insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));

        // get current continuation and store in the next to last local variable
        insList.insert(InstructionFactory.createStore(CONTINUATION_TYPE, method.getMaxLocals()));
        insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, CONTINUATION_METHOD, CONTINUATION_TYPE,
                       Type.NO_ARGS, Constants.INVOKESTATIC));

        // make room for additional objects
        method.setMaxLocals(method.getMaxLocals() + 2);
        method.setMaxStack(method.getMaxStack() + 2);
View Full Code Here


            insList.append(new SWAP());
            if (type instanceof BasicType) {
                if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                    type = Type.INT;
                }
                insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(type), Type.VOID, new Type[]{type}, Constants.INVOKEVIRTUAL));
            } 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
View Full Code Here

                if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                    type = Type.INT;
                }
                insList.append(insFactory.createInvoke(STACK_CLASS, getPushMethod(type), Type.VOID, new Type[]{type}, Constants.INVOKEVIRTUAL));
            } 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()));
View Full Code Here

            insList.append(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));
            if (type instanceof BasicType) {
                if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                    type = Type.INT;
                }
                insList.append(insFactory.createInvoke(STACK_CLASS, getPopMethod(type), type, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            } else if (type instanceof ReferenceType) {
                insList.append(insFactory.createInvoke(STACK_CLASS, getPopMethod(Type.OBJECT), Type.OBJECT, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
                if (!type.equals(Type.OBJECT)) {
                    insList.append(insFactory.createCast(Type.OBJECT, type));
                }
View Full Code Here

                if (type.getSize() < 2 && !type.equals(Type.FLOAT)) {
                    type = Type.INT;
                }
                insList.append(insFactory.createInvoke(STACK_CLASS, getPopMethod(type), type, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            } else if (type instanceof ReferenceType) {
                insList.append(insFactory.createInvoke(STACK_CLASS, getPopMethod(Type.OBJECT), Type.OBJECT, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
                if (!type.equals(Type.OBJECT)) {
                    insList.append(insFactory.createCast(Type.OBJECT, type));
                }
            }
        }
View Full Code Here

                                              "<init>",
                                              dispatcherClassName,
                                              il,
                                              cp);
        il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
        il.append(instFactory.createInvoke("java.lang.Object",
                                           "<init>",
                                           Type.VOID,
                                           Type.NO_ARGS,
                                           Constants.INVOKESPECIAL));
View Full Code Here

                argumentTypes = new Type[] { hierarchyTop, ObjectType.LONG,
                        abstractWindowingPEType };
            } else {
                argumentTypes = new Type[] { hierarchyTop };
            }
            il.append(instFactory.createInvoke(targetClass.getName(),
                                               "processEvent",
                                               Type.VOID,
                                               argumentTypes,
                                               Constants.INVOKEVIRTUAL));
View Full Code Here

                                              "<init>",
                                              clonerClassname,
                                              il,
                                              cp);
        il.append(InstructionFactory.createLoad(Type.OBJECT, 0));
        il.append(instFactory.createInvoke("java.lang.Object",
                                           "<init>",
                                           Type.VOID,
                                           Type.NO_ARGS,
                                           Constants.INVOKESPECIAL));
View Full Code Here

        il.append(instFactory.createFieldAccess("java.lang.System",
                                                "out",
                                                new ObjectType("java.io.PrintStream"),
                                                Constants.GETSTATIC));
        il.append(new PUSH(cp, "Not cloneable!"));
        il.append(instFactory.createInvoke("java.io.PrintStream",
                                           "println",
                                           Type.VOID,
                                           new Type[] { Type.STRING },
                                           Constants.INVOKEVIRTUAL));
        il.append(InstructionConstants.ACONST_NULL);
View Full Code Here

                                           Constants.INVOKEVIRTUAL));
        il.append(InstructionConstants.ACONST_NULL);
        il.append(InstructionFactory.createReturn(Type.OBJECT));
        InstructionHandle ih_31 = il.append(InstructionFactory.createLoad(Type.OBJECT,
                                                                          2));
        il.append(instFactory.createInvoke(className,
                                           "clone",
                                           Type.OBJECT,
                                           Type.NO_ARGS,
                                           Constants.INVOKEVIRTUAL));
        il.append(InstructionFactory.createReturn(Type.OBJECT));
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.