Examples of ConstClass


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

        // 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

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

        // 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

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

        // 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

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

            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

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

        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

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

            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

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

        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

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

        // 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

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

        // get the field's declaring class from the model
        final String declClassName =
            meta.getDeclaringClass(qualifyingClassName, fieldName);
        affirm(declClassName != null, "Cannot get declaring class of "
               + qualifyingClassName + "." + fieldName);
        final ConstClass declClass = pool.addClass(declClassName);

        // check if field is known to be non-managed
        if (meta.isKnownNonManagedField(declClassName, fieldName, fieldType)) {
            return insn;
        }
View Full Code Here

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

            if (!(methodName.equals("clone")
                  && methodSig.equals("()Ljava/lang/Object;")))
                continue;

            if (false) {
                final ConstClass methodClass = methodRef.className();
                final String methodClassName = methodClass.asString();
                System.out.println("        found invocation of: "
                                   + methodClassName
                                   + "." + methodName + methodSig);
            }

            // check whether next instruction already is a downcast to a
            // class implementing PersistenceCapable
            final String thisClass = classFile.classNameString();
            final Insn checkCastInsn = insn.next();
            final boolean needCheckcast;
            if (checkCastInsn.opcode() != opc_checkcast) {
                needCheckcast = true;
            } else {
                ConstClass target =
                    (ConstClass) ((InsnConstOp)checkCastInsn).value();
                if (target.asString().equals(thisClass)) {
                    insn = checkCastInsn;
                    needCheckcast = false;
                } else {
                    needCheckcast = true;
                }
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.