Examples of InsnTarget


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

        affirm(insn != null);
        affirm(exceptionName != null);
        affirm(exceptionText != null);
       
        // throw exception if sm == null
        final InsnTarget body = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(argStart, pool));
        insn = insn.append(
            Insn.create(
                opc_getfield,
                getjdoStateManagerFieldRef()));
View Full Code Here

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

        affirm(insn != null);
        affirm(exceptionName != null);
        affirm(exceptionText != null);

        // throw exception if obj == null
        final InsnTarget body = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(argStart, pool));
        insn = insn.append(Insn.create(opc_ifnonnull, body));
        insn = appendThrowJavaException(insn, exceptionName, exceptionText);
        insn = insn.append(body);
View Full Code Here

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

        affirm(constClass != null);
        affirm(exceptionName != null);
        affirm(exceptionText != null);

        // throw exception if obj not instance of class
        final InsnTarget body = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(argStart, pool));
        insn = insn.append(Insn.create(opc_instanceof, constClass));
        insn = insn.append(Insn.create(opc_ifne, body));
        insn = appendThrowJavaException(insn, exceptionName, exceptionText);
        insn = insn.append(body);
View Full Code Here

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

        // assumed nonstatic call; otherwise subtract 'this' from maxStack
        affirm((accessFlags & ACCStatic) == 0);
        final ExceptionsAttribute exceptAttr = null;

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

        // end of method body
        insn = insn.append(Insn.create(opc_return));
View Full Code Here

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

        final ExceptionsAttribute exceptAttr = null;

        //^olsen: 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_2));

        // test the sm field and call the sm if nonnull
        final InsnTarget check = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_2));
        insn = insn.append(Insn.create(opc_ifnull, check));

        // load 'this' on the stack
        insn = insn.append(Insn.create(opc_aload_0));
View Full Code Here

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

        final String methodSig = JDO_PC_jdoReplaceFlags_Sig;
        final int accessFlags = JDO_PC_jdoReplaceFlags_Mods;
        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 goto end if null
        final InsnTarget end = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_ifnull, end));

        // load 'this' on the stack
        insn = insn.append(Insn.create(opc_aload_0));
View Full Code Here

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

        final String methodSig = JDO_PC_jdoMakeDirty_Sig;
        final int accessFlags = JDO_PC_jdoMakeDirty_Mods;
        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_2));

        // test the sm field and goto end if null
        final InsnTarget end = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_2));
        insn = insn.append(Insn.create(opc_ifnull, end));

        // call the sm's method with 'this' and 'fieldname' arguments
        insn = insn.append(Insn.create(opc_aload_2));
View Full Code Here

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

        final String methodSig = JDO_PC_jdoPreSerialize_Sig;
        final int accessFlags = JDO_PC_jdoPreSerialize_Mods;
        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 goto end if null
        final InsnTarget end = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_ifnull, end));

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

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

            = new ExceptionsAttribute(
                pool.addUtf8(ExceptionsAttribute.expectedAttrName),
                pool.addClass("java/io/IOException"));
       
        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;

        // call jdoPreSerialize
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
View Full Code Here

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

    public void addJDOPreSerializeCall(String methodName, String methodSig)
    {
        final ExceptionsAttribute exceptAttr = null;

        // begin of method body
        final InsnTarget begin = new InsnTarget();
        Insn insn = begin;
       
        // invoke jdoPreSerialize
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
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.