Package org.apache.bcel.generic

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


        mf.append(factory.createLoad(_type, 1));

        // Invoke the update method

        mf.append(
            factory.createInvoke(
                IBinding.class.getName(),
                updateMethodName,
                Type.VOID,
                new Type[] { argumentType },
                Constants.INVOKEINTERFACE));
View Full Code Here


            mf.append(factory.createLoad(fieldType, 1));

            Type argumentType = convertToArgumentType(fieldType);

            mf.append(
                factory.createInvoke(
                    _subclassName,
                    "fireObservedChange",
                    Type.VOID,
                    new Type[] { Type.STRING, argumentType },
                    Constants.INVOKEVIRTUAL));
View Full Code Here

        // May need to use alternate forName() and pass Thread's context class loader.

        mf.append(new PUSH(cf.getConstantPool(), _typeClassName));
        InstructionHandle tryStart =
            mf.append(
                factory.createInvoke(
                    "java.lang.Class",
                    "forName",
                    _classType,
                    new Type[] { Type.STRING },
                    Constants.INVOKESTATIC));
View Full Code Here

        // Stack: ARE, CCE, ARE -> ARE, ARE, CCE

        mf.append(InstructionConstants.SWAP);

        mf.append(
            factory.createInvoke(
                exceptionClassName,
                Constants.CONSTRUCTOR_NAME,
                Type.VOID,
                new Type[] { throwableType },
                Constants.INVOKESPECIAL));
View Full Code Here

        InstructionFactory factory = cf.getInstructionFactory();

        mf.append(factory.createThis());
        mf.append(
            factory.createInvoke(
                cf.getClassName(),
                readBindingMethodName,
                _bindingType,
                noArgs,
                Constants.INVOKEVIRTUAL));
View Full Code Here

        if (accessMethodName != null)
        {
            // The binding object is on top of the stack
            mf.append(
                factory.createInvoke(
                    IBinding.class.getName(),
                    accessMethodName,
                    _type,
                    noArgs,
                    Constants.INVOKEINTERFACE));
View Full Code Here

            mf.append(new PUSH(cf.getConstantPool(), _parameterName));
            mf.append(factory.createGetStatic(cf.getClassName(), fieldName, _classType));

            mf.append(
                factory.createInvoke(
                    IBinding.class.getName(),
                    "getObject",
                    Type.OBJECT,
                    new Type[] { Type.STRING, _classType },
                    Constants.INVOKEINTERFACE));
View Full Code Here

            invokeIns.copyInto(tableTargets);
            insList.insert(restorer);

            // select frame restorer
            insList.insert(new TABLESWITCH(match, tableTargets, firstIns));
            insList.insert(insFactory.createInvoke(STACK_CLASS, getPopMethod(Type.INT), Type.INT, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            insList.insert(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));

            // test if the continuation should be restored
            insList.insert(new IFEQ(firstIns));
            insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, RESTORING_METHOD, Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
View Full Code Here

            insList.insert(insFactory.createInvoke(STACK_CLASS, getPopMethod(Type.INT), Type.INT, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            insList.insert(InstructionFactory.createLoad(STACK_TYPE, method.getMaxLocals()+1));

            // test if the continuation should be restored
            insList.insert(new IFEQ(firstIns));
            insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, RESTORING_METHOD, Type.BOOLEAN, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
            insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));
        }

        // get stack from current continuation and store in the last local variable
        insList.insert(InstructionFactory.createStore(STACK_TYPE, method.getMaxLocals()+1));
View Full Code Here

            insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));
        }

        // get stack from current continuation and store in the last local variable
        insList.insert(InstructionFactory.createStore(STACK_TYPE, method.getMaxLocals()+1));
        insList.insert(insFactory.createInvoke(CONTINUATION_CLASS, STACK_METHOD, STACK_TYPE,
                       Type.NO_ARGS, Constants.INVOKEVIRTUAL));
        InstructionHandle restore_handle = insList.insert(InstructionFactory.createLoad(CONTINUATION_TYPE, method.getMaxLocals()));

        // if not continuation exists, create empty stack
        insList.insert(new GOTO(firstIns));
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.