Examples of InsnTarget


Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

                                           final String delegateSig)
    {
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // store the sm field into local var
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_astore_1));

        // test the sm field and do the call if nonnull
        InsnTarget noncall = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_ifnull, noncall));

        // call the sm's method with 'this' argument and return
        insn = insn.append(Insn.create(opc_aload_1));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

                                         final String delegateSig)
    {
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // store the sm field into local var
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(Insn.create(opc_astore_1));

        // test the sm field and do the call if nonnull
        InsnTarget noncall = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_ifnull, noncall));

        // call the sm's method with 'this' argument and return
        insn = insn.append(Insn.create(opc_aload_1));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

                                                   final String delegateSig)
    {
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // check arg
        insn = appendCheckVarNonNull(insn, 1,
                                     JAVA_IllegalArgumentException_Path,
                                     "arg1");

        // store the array argument length into local var
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_arraylength));
        insn = insn.append(Insn.create(opc_istore_2));

        // init loop counter and goto loop check
        final InsnTarget loopcheck = new InsnTarget();
        insn = insn.append(Insn.create(opc_iconst_0));
        insn = insn.append(Insn.create(opc_istore_3));
        insn = insn.append(Insn.create(opc_goto, loopcheck));

        // loop body: call self-delegating method with array element
        final InsnTarget loopbody = new InsnTarget();
        insn = insn.append(loopbody);
        insn = insn.append(Insn.create(opc_aload_0));

        // select element from array argument at loop counter
        insn = insn.append(Insn.create(opc_aload_1));
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = SUNJDO_PC_sunjdoClassForName_Sig;
        final int accessFlags = SUNJDO_PC_sunjdoClassForName_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // invoke the Class.forName(String) method with argument
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(opc_invokestatic,
                        pool.addMethodRef(
                            JAVA_Class_Path,
                            JAVA_Class_forName_Name,
                            JAVA_Class_forName_Sig)));

        // end of method body
        insn = insn.append(Insn.create(opc_areturn));

        // begin of exception handler
        final InsnTarget end = new InsnTarget();
        final InsnTarget beginHandler = end;
        insn = insn.append(beginHandler);

        // create NoClassDefFoundError with message from caught exception
        insn = insn.append(Insn.create(opc_astore_1));
        insn = insn.append(
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final int managedFieldCount = analyzer.getManagedFieldCount();
        affirm(managedFieldCount >= 0);

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // push total (absolute) number of managed fields
        final boolean isPCRoot = analyzer.isAugmentableAsRoot();
        if (isPCRoot) {
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JAVA_clinit_Sig;
        final int accessFlags = JAVA_clinit_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // initialize jdo fields
        insn = initJdoInheritedFieldCount(insn);
        insn = initJdoFieldNames(insn);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JDO_PC_jdoNewInstance_Sig;
        final int accessFlags = JDO_PC_jdoNewInstance_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // push a newly created an instance of this class
        final ConstClass thisConstClass = classFile.className();
        affirm(thisConstClass != null);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JDO_PC_jdoNewInstance_Object_Sig;
        final int accessFlags = JDO_PC_jdoNewInstance_Object_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // push a newly created an instance of this class
        final ConstClass thisConstClass = classFile.className();
        affirm(thisConstClass != null);
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        affirm(managedFieldSigs.length >= managedFieldCount);
        affirm(managedFieldRefs.length >= managedFieldCount);

        // generate the switch
        final int lowOp = 0;
        final InsnTarget defaultOp = new InsnTarget();
        final InsnTarget[] targetsOp = new InsnTarget[managedFieldCount];
        for (int i = 0; i < managedFieldCount; i++) {
            targetsOp[i] = new InsnTarget();
        }           

        // javac prefers lookup switches for 1-element tables
        if (managedFieldCount <= 1) {
            final int[] matchesOp
View Full Code Here

Examples of org.apache.jdo.impl.enhancer.classfile.InsnTarget

        final String methodSig = JDO_PC_jdoProvideField_Sig;
        final int accessFlags = JDO_PC_jdoProvideField_Mods;
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // generate the begin code
        insn = appendBeginProvideReplaceField(insn);
       
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.