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

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


        // invoke jdoGetManagedFieldCount if not PCRoot class
        final boolean isPCRoot = analyzer.isAugmentableAsRoot();
        if (isPCRoot) {
            insn = insn.append(Insn.create(opc_iconst_0));
        } else {
            final ConstClass superConstClass = classFile.superName();
            affirm(superConstClass != null);
            final String superClassName = superConstClass.asString();
            affirm(superClassName != null);
            insn = insn.append(
                Insn.create(opc_invokestatic,
                            pool.addMethodRef(
                                superClassName,
View Full Code Here


        // push a newly created an instance of this class or null if
        // class is abstract
        if (classFile.isAbstract()) {
            insn = insn.append(Insn.create(opc_aconst_null));
        } else {
            final ConstClass thisConstClass = classFile.className();
            affirm(thisConstClass != null);
            insn = insn.append(Insn.create(opc_new, thisConstClass));
            insn = insn.append(Insn.create(opc_dup));
            insn = insn.append(
                Insn.create(opc_invokespecial,
View Full Code Here

        // 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);
        insn = insn.append(Insn.create(opc_new, thisConstClass));
        insn = insn.append(Insn.create(opc_dup));
        insn = insn.append(
            Insn.create(opc_invokespecial,
View Full Code Here

        // 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);
        insn = insn.append(Insn.create(opc_new, thisConstClass));
        insn = insn.append(Insn.create(opc_dup));
        insn = insn.append(
            Insn.create(opc_invokespecial,
View Full Code Here

            insn = appendThrowJavaException(insn,
                                            JAVA_IllegalArgumentException_Path,
                                            "arg1");
        } else {
            // call super.jdoProvideField(int)
            final ConstClass superConstClass = classFile.superName();
            affirm(superConstClass != null);
            final String superClassName = superConstClass.asString();
            affirm(superClassName != null);
            insn = insn.append(Insn.create(opc_aload_0));
            insn = insn.append(Insn.create(opc_iload_1));
            insn = insn.append(
                Insn.create(opc_invokespecial,
View Full Code Here

        insn = appendCheckStateManager(insn, 0,
                                       JAVA_IllegalStateException_Path,
                                       "arg0." + JDO_PC_jdoStateManager_Name);

        // check pc argument
        final ConstClass thisConstClass = classFile.className();
        affirm(thisConstClass != null);
        insn = appendCheckVarInstanceOf(insn, 1, thisConstClass,
                                        JAVA_IllegalArgumentException_Path,
                                        "arg1");
View Full Code Here

            return;
        }
        affirm(keyClassName != null);

        // check oid argument
        final ConstClass keyConstClass = pool.addClass(keyClassName);
        affirm(keyConstClass != null);
        insn = appendCheckVarInstanceOf(insn, 1, keyConstClass,
                                        JAVA_IllegalArgumentException_Path,
                                        "arg1");
View Full Code Here

        insn = appendCheckVarNonNull(insn, 1,
                                     JAVA_IllegalArgumentException_Path,
                                     "arg1");
       
        // check oid argument
        final ConstClass keyConstClass = pool.addClass(keyClassName);
        affirm(keyConstClass != null);
        insn = appendCheckVarInstanceOf(insn, 2, keyConstClass,
                                        JAVA_IllegalArgumentException_Path,
                                        "arg2");
View Full Code Here

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

        // THISCLASS newObject = (THISCLASS) super.clone();
        final ConstClass superConstClass = classFile.superName();
        final ConstClass thisConstClass = classFile.className();
        affirm(thisConstClass != null);
        insn = insn.append(Insn.create(opc_aload_0));
        insn = insn.append(
            Insn.create(opc_invokespecial,
                        pool.addMethodRef(superConstClass.asString(),
View Full Code Here

        throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError
    {
        // get the instruction arguments
        final InsnConstOp fieldInsn = (InsnConstOp)insn;
        final ConstFieldRef fieldRef = (ConstFieldRef)fieldInsn.value();
        final ConstClass declClass = fieldRef.className();
        final String declClassName = declClass.asString();
        final ConstNameAndType fieldNameAndType = fieldRef.nameAndType();
        final String fieldName = fieldNameAndType.name().asString();
        final String fieldType = fieldNameAndType.signature().asString();

        // check if field is known to be non-managed or not annotatable
View Full Code Here

TOP

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

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.