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

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


            = new CodeAttribute(getCodeAttributeUtf8(),
                                isPCRoot ? 1 : 2, // maxStack
                                0, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here


            = new CodeAttribute(getCodeAttributeUtf8(),
                                7, // maxStack
                                0, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());

        if (analyzer.hasStaticInitializer()) {
            // not end of method body
            augmenter.prependMethod(methodName, methodSig,
                                    codeAttr, exceptAttr);
View Full Code Here

            = new CodeAttribute(getCodeAttributeUtf8(),
                                2, // maxStack
                                3, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

            = new CodeAttribute(getCodeAttributeUtf8(),
                                2, // maxStack
                                4, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

            = new CodeAttribute(getCodeAttributeUtf8(),
                                maxStack, // maxStack
                                3, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

            = new CodeAttribute(getCodeAttributeUtf8(),
                                maxStack, // maxStack
                                3, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

            = new CodeAttribute(getCodeAttributeUtf8(),
                                3, // maxStack
                                3, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

            = new CodeAttribute(getCodeAttributeUtf8(),
                                4, // maxStack
                                6, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

                = new CodeAttribute(getCodeAttributeUtf8(),
                                    1, // maxStack
                                    1, // maxLocals
                                    begin,
                                    new ExceptionTable(),
                                    new AttributeVector());
            augmenter.addMethod(methodName, methodSig, accessFlags,
                                codeAttr, exceptAttr);
            return;
        }
        affirm(keyClassName != null);

        // push a newly created an instance of this class
        insn = insn.append(
            Insn.create(opc_new,
                        pool.addClass(keyClassName)));
        insn = insn.append(Insn.create(opc_dup));
        insn = insn.append(
            Insn.create(opc_invokespecial,
                        pool.addMethodRef(
                            keyClassName,
                            NameHelper.constructorName(),
                            NameHelper.constructorSig())));

        // end of method body
        insn = insn.append(Insn.create(opc_areturn));

        final CodeAttribute codeAttr
            = new CodeAttribute(getCodeAttributeUtf8(),
                                2, // maxStack
                                1, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

                = new CodeAttribute(getCodeAttributeUtf8(),
                                    1, // maxStack
                                    2, // maxLocals
                                    begin,
                                    new ExceptionTable(),
                                    new AttributeVector());
            augmenter.addMethod(methodName, methodSig, accessFlags,
                                codeAttr, exceptAttr);
            return;
        }
        affirm(keyClassName != null);

        // TODO: support for single field identity

        // push a newly created an instance of this class
        insn = insn.append(
            Insn.create(opc_new,
                        pool.addClass(keyClassName)));
        insn = insn.append(Insn.create(opc_dup));
        insn = insn.append(Insn.create(opc_aload_1));
        insn = insn.append(Insn.create(opc_checkcast,
                                       pool.addClass(JAVA_String_Path)));
        insn = insn.append(
            Insn.create(opc_invokespecial,
                        pool.addMethodRef(
                            keyClassName,
                            NameHelper.constructorName(),
                            NameHelper.constructorSig(JAVA_String_Sig))));

        // end of method body
        insn = insn.append(Insn.create(opc_areturn));

        final CodeAttribute codeAttr
            = new CodeAttribute(getCodeAttributeUtf8(),
                                3, // maxStack
                                2, // maxLocals
                                begin,
                                new ExceptionTable(),
                                new AttributeVector());
        augmenter.addMethod(methodName, methodSig, accessFlags,
                            codeAttr, exceptAttr);
    }
View Full Code Here

TOP

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

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.