Package org.codehaus.aspectwerkz.annotation.instrumentation.asm

Examples of org.codehaus.aspectwerkz.annotation.instrumentation.asm.CustomAttribute


        try {
            ClassReader cr = new ClassReader(bytecode);
            ClassWriter cw = AsmHelper.newClassWriter(true);
            ClassInfoClassAdapter visitor = new ClassInfoClassAdapter(cw);
            cr.accept(visitor, new Attribute[] {
                new CustomAttribute()
            }, false);
        } catch (Throwable t) {
            t.printStackTrace();
        }
View Full Code Here


        public void visitAttribute(final Attribute attrs) {
            Attribute attributes = attrs;
            while (attributes != null) {
                if (attributes instanceof CustomAttribute) {
                    CustomAttribute customAttribute = (CustomAttribute) attributes;
                    byte[] bytes = customAttribute.getBytes();
                    try {
                        m_annotations.add(new ObjectInputStream(new ByteArrayInputStream(bytes)).readObject());
                    } catch (Exception e) {
                        System.err.println("WARNING: could not deserialize annotation due to: " + e.toString());
                    }
View Full Code Here

     */
    private void addAnnotations(final Attribute attrs) {
        Attribute attributes = attrs;
        while (attributes != null) {
            if (attributes instanceof CustomAttribute) {
                CustomAttribute customAttribute = (CustomAttribute) attributes;
                byte[] bytes = customAttribute.getBytes();
                try {
                    m_annotations.add(new ObjectInputStream(new ByteArrayInputStream(bytes)).readObject());
                } catch (Exception e) {
                    System.err.println("WARNING: could not deserialize annotation due to: " + e.toString());
                }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.annotation.instrumentation.asm.CustomAttribute

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.