Package org.apache.jdo.impl.enhancer.classfile

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


            accessFlags = JDO_PC_jdoCopyKeyFieldsFromObjectId_OIFC_Mods;
        }
        final ExceptionsAttribute exceptAttr = null;

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

        // generate empty method in case of datastore identity
        final String keyClassName = analyzer.getKeyClassName();
        if (keyClassName == null){
View Full Code Here


        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
        final String sig = fieldRef.nameAndType().signature().asString();
View Full Code Here

                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(InsnUtils.aStore(varStart, pool));

        // test the sm field and return field if null
        final InsnTarget callIsLoaded = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(varStart, pool));
        insn = insn.append(Insn.create(opc_ifnonnull, callIsLoaded));
        insn = appendDirectReadReturn(insn, fieldRef);

        // call sm for isLoaded
        insn = insn.append(callIsLoaded);
        insn = insn.append(InsnUtils.aLoad(varStart, pool));

        // push instance
        insn = insn.append(Insn.create(opc_aload_0));

        // push absolute field index
        insn = insn.append(
            Insn.create(opc_getstatic,
                        pool.addFieldRef(
                            className,
                            JDO_PC_jdoInheritedFieldCount_Name,
                            JDO_PC_jdoInheritedFieldCount_Sig)));
        insn = insn.append(InsnUtils.integerConstant(fieldIndex, pool));
        insn = insn.append(Insn.create(opc_iadd));

        // test result of isLoaded and return field if nonzero
        final InsnTarget mediate = new InsnTarget();
        insn = insn.append(
            new InsnInterfaceInvoke(
                pool.addInterfaceMethodRef(
                    JDO_StateManager_Path,
                    JDO_SM_isLoaded_Name,
View Full Code Here

        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        // get field's sig and compute first non-parameter slot
        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
View Full Code Here

        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        // get field's sig and compute first non-parameter slot
        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
        final String sig = fieldRef.nameAndType().signature().asString();
        affirm(sig != null && sig.length() > 0);
        final int fieldSize = ((sig.equals("J") || sig.equals("D")) ? 2 : 1);
        final int varStart = 1;

        // directly return field if flags are <= LOAD_REQUIRED
        final InsnTarget mediate = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(opc_getfield,
                        getjdoFlagsFieldRef()));
        insn = insn.append(Insn.create(opc_ifgt, mediate));
View Full Code Here

        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
View Full Code Here

                opc_getfield,
                getjdoStateManagerFieldRef()));
        insn = insn.append(InsnUtils.aStore(varStart, pool));

        // test the sm field and assign field if null
        final InsnTarget mediate = new InsnTarget();
        insn = insn.append(InsnUtils.aLoad(varStart, pool));
        insn = insn.append(Insn.create(opc_ifnonnull, mediate));

        // write argument to field and return
        insn = appendDirectWriteReturn(insn, fieldRef);
View Full Code Here

        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        // get field's sig and compute first non-parameter slot
        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
View Full Code Here

        affirm(methodName != null);     
        affirm(methodSig != null);     
        final ExceptionsAttribute exceptAttr = null;

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

        // get field's sig and compute first non-parameter slot
        final ConstFieldRef fieldRef = getAnnotatedFieldRefs()[fieldIndex];
        affirm(fieldRef != null);
        final String sig = fieldRef.nameAndType().signature().asString();
        affirm(sig != null && sig.length() > 0);
        final int fieldSize = ((sig.equals("J") || sig.equals("D")) ? 2 : 1);
        final int varStart = fieldSize + 1;

        // directly write argument and retrurn if flags are != READ_WRITE_OK
        final InsnTarget mediate = new InsnTarget();
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(opc_getfield,
                        getjdoFlagsFieldRef()));
        insn = insn.append(Insn.create(opc_ifne, mediate));
View Full Code Here

        final String methodSig = "()V";
        final int accessFlags = 0;
        final ExceptionsAttribute exceptAttr = null;

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

        //@olsen: disabled code
        if (false) {
            // reset jdoFlags = LOAD_REQUIRED
View Full Code Here

TOP

Related Classes of org.apache.jdo.impl.enhancer.classfile.InsnTarget

Copyright © 2018 www.massapicom. 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.