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

Examples of org.apache.jdo.impl.enhancer.classfile.ConstClass.asString()


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


    {
        // get the instruction arguments
        final InsnConstOp methodInsn = (InsnConstOp)insn;
        final ConstMethodRef methodRef = (ConstMethodRef)methodInsn.value();
        final ConstClass declClass = methodRef.className();
        final String declClassName = declClass.asString();
        final ConstNameAndType methodNameAndType = methodRef.nameAndType();
        final String methodName = methodNameAndType.name().asString();
        final String methodType = methodNameAndType.signature().asString();

        if (!methodName.startsWith("jdoSet")
View Full Code Here

            final ConstClass superConstClass = classFile.superName();
            affirm(superConstClass != null);

            // non-pc-root classes must not derive from java.lang.Object
            affirm(pcSuperClassName == null
                   || !superConstClass.asString().equals("java/lang/Object"));

            // define the PC key owner class
            pcKeyOwnerClassName = className;
            while (meta.getKeyClass(pcKeyOwnerClassName) == null) {
                final String pcSuperClassName
View Full Code Here

    {
        hasImplementsPC = false;
        for (final Iterator ifc = classFile.interfaces().iterator();
             ifc.hasNext();) {
            final ConstClass i = (ConstClass)ifc.next();
            if (i.asString().equals(JDO_PersistenceCapable_Path)) {
                hasImplementsPC = true;
                break;
            }
        }
        env.message(
View Full Code Here

            insn = insn.append(InsnUtils.integerConstant(managedFieldCount, pool));
        }
        else {
            final ConstClass superConstClass = classFile.superName();
            affirm(superConstClass != null);
            final String superClassName = superConstClass.asString();
            affirm(superClassName != null);
            // call the superclass' jdoGetManagedFieldCount method
            insn = insn.append(
                Insn.create(opc_invokestatic,
                            pool.addMethodRef(
View Full Code Here

        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

                                            "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

                  && 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);
            }
View Full Code Here

            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

            insn = insn.append(InsnUtils.integerConstant(managedFieldCount, pool));
        }
        else {
            final ConstClass superConstClass = classFile.superName();
            affirm(superConstClass != null);
            final String superClassName = superConstClass.asString();
            affirm(superClassName != null);
            // call the superclass' jdoGetManagedFieldCount method
            insn = insn.append(
                Insn.create(opc_invokestatic,
                            pool.addMethodRef(
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.