Examples of ConstClass


Examples of com.sun.jdo.api.persistence.enhancer.classfile.ConstClass

    /**
     * Return the class name in VM form
     */
    public String className() {
        ConstClass cname = theClass.className();
        return (cname == null) ? null : cname.asString();
    }
View Full Code Here

Examples of com.sun.jdo.api.persistence.enhancer.classfile.ConstClass

    /**
     * Return the class name in VM form
     */
    public String className() {
        ConstClass cname = theClass.className();
        return (cname == null) ? null : cname.asString();
    }
View Full Code Here

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

        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

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

        throws EnhancerMetaDataUserException, EnhancerMetaDataFatalError
    {
        // 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

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

            affirm(!classFile.isInterface());
            //affirm(!classFile.isInnerClass());

            //^olsen: assert consistency between Java and JDO metadata
            // disallow enhancing classes not derived from java.lang.Object
            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

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

    private void scanForImplementsPC()
    {
        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

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

    private void augmentClassInterface(String interfaceName)
    {
        env.message("adding: implements "
                    + ClassFile.userClassFromVMClass(interfaceName));

        final ConstClass iface = pool.addClass(interfaceName);
        classFile.addInterface(iface);

        // notify controller of class change
        control.noteUpdate();
    }
View Full Code Here

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

        // end of exception handler
        insn = insn.append(Insn.create(opc_athrow));

        // create exception table
        final ConstClass catchType
            = pool.addClass(JAVA_ClassNotFoundException_Path);
        final ExceptionRange exceptionRange
            = new ExceptionRange(begin, end, beginHandler, catchType);
        final ExceptionTable exceptionTable
            = new ExceptionTable();
View Full Code Here

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

        final boolean isPCRoot = analyzer.isAugmentableAsRoot();
        if (isPCRoot) {
            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

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