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

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


        env.message("adding: "
                    + Descriptor.userFieldSig(fieldSig)
                    + " " + fieldName);

        //@olsen: fix 4467428, add synthetic attribute for generated fields
        final AttributeVector fieldAttrs = new AttributeVector();
        fieldAttrs.addElement(
            new SyntheticAttribute(
                pool.addUtf8(SyntheticAttribute.expectedAttrName)));

        // create and add the field
        final ClassField field
View Full Code Here


            // get first instruction which always is an instruction target
            affirm(codeAttr.theCode().opcode() == Insn.opc_target);
            final InsnTarget begin = (InsnTarget)codeAttr.theCode();

            // get attributes of the code attribute
            final AttributeVector codeSpecificAttrs = codeAttr.attributes();
            affirm(codeSpecificAttrs != null);
           
            // add dummy line number attribute with first instruction
            codeSpecificAttrs.addElement(
                new LineNumberTableAttribute(
                    pool.addUtf8(LineNumberTableAttribute.expectedAttrName),
                    new short[]{ 0 }, new InsnTarget[]{ begin }));
        }

        // add the method's code and exception attributes
        final AttributeVector methodAttrs = new AttributeVector();
        methodAttrs.addElement(codeAttr);
        if (exceptAttr != null) {
            methodAttrs.addElement(exceptAttr);
        }
       
        //@olsen: fix 4467428, add synthetic attribute for generated methods
        if (addSyntheticAttr) {
            methodAttrs.addElement(
                new SyntheticAttribute(
                    pool.addUtf8(SyntheticAttribute.expectedAttrName)));
        }
       
        // create and add the method
View Full Code Here

           
            final ExceptionsAttribute foundExceptAttr
                = method.exceptionsAttribute();
            if (foundExceptAttr == null) {
                // add the exception attribute
                final AttributeVector methodAttrs = method.attributes();
                affirm(methodAttrs != null);
                methodAttrs.addElement(exceptAttr);
            } else {
                // add those exceptions not already present
                final List foundEx = foundExceptAttr.getExceptions();
                final List newEx = exceptAttr.getExceptions();
                newEx.removeAll(foundEx);
View Full Code Here

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

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

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

            = new CodeAttribute(getCodeAttributeUtf8(),
                                3, // maxStack
                                2, // 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(),
                                2, // maxStack
                                2, // 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);
       
    }
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.