Package org.objectweb.asm

Examples of org.objectweb.asm.Attribute


            final String name,
            final String desc,
            final Object value,
            final Attribute attrs) {

            Attribute first = null;
            Attribute current = null;
            if (attrs != null) {
                first = attrs;
            }
            for (Iterator it = m_fieldAttributes.iterator(); it.hasNext();) {
                FieldAttributeInfo struct = (FieldAttributeInfo) it.next();
View Full Code Here


            final String name,
            final String desc,
            final String[] exceptions,
            final Attribute attrs) {

            Attribute first = null;
            Attribute current = null;
            if (attrs != null) {
                first = attrs;
            }
            current = first;
            for (Iterator it = m_methodAttributes.iterator(); it.hasNext();) {
View Full Code Here

            }
            return cv.visitMethod(access, name, desc, exceptions, attrs);
        }

        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 {
View Full Code Here

     * Retrieves and adds the annotations.
     *
     * @param attrs
     */
    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 {
View Full Code Here

    assertBlock(123, 0);
  }

  @Test
  public void testVisitAttribute() {
    blockVisitor.visitAttribute(new Attribute("com/example/Foo") {
    });
    blockVisitor.visitBlockEnd(123);
    assertBlock(123, 0);
  }
View Full Code Here

    assertBlock(123, 0);
  }

  @Test
  public void testVisitAttribute() {
    blockVisitor.visitAttribute(new Attribute("com/example/Foo") {
    });
    blockVisitor.visitBlockEnd(123);
    assertBlock(123, 0);
  }
View Full Code Here

        handler.startDocument();
        cr.accept(new SAXClassAdapter(handler, false), 0);
        handler.endDocument();

        ClassWriter cw = new ClassWriter(0);
        cr.accept(cw, new Attribute[] { new Attribute("Comment") {
            protected Attribute read(
                final ClassReader cr,
                final int off,
                final int len,
                final char[] buf,
                final int codeOff,
                final Label[] labels)
            {
                return null; // skip these attributes
            }
        },
            new Attribute("CodeComment") {
                protected Attribute read(
                    final ClassReader cr,
                    final int off,
                    final int len,
                    final char[] buf,
View Full Code Here

     * @param attribute
     * @return the RuntimeInvisibleAnnotations to add Annotation to
     */
    public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {
        RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;
        Attribute lastAttribute = attribute;
        for (Attribute loop = attribute; loop != null; loop = loop.next) {
            lastAttribute = loop;
            if (loop instanceof RuntimeInvisibleAnnotations) {
                return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations) loop;
            }
View Full Code Here

    assertBlock(123, 0);
  }

  @Test
  public void testVisitAttribute() {
    blockVisitor.visitAttribute(new Attribute("com/example/Foo") {
    });
    blockVisitor.visitBlockEnd(123);
    assertBlock(123, 0);
  }
View Full Code Here

     * @param attribute
     * @return the RuntimeInvisibleAnnotations to add Annotation to
     */
    public static RuntimeInvisibleAnnotations linkRuntimeInvisibleAnnotations(final Attribute attribute) {
        RuntimeInvisibleAnnotations runtimeInvisibleAnnotations = null;
        Attribute lastAttribute = attribute;
        for (Attribute loop = attribute; loop != null; loop = loop.next) {
            lastAttribute = loop;
            if (loop instanceof RuntimeInvisibleAnnotations) {
                return runtimeInvisibleAnnotations = (RuntimeInvisibleAnnotations)loop;
            }
View Full Code Here

TOP

Related Classes of org.objectweb.asm.Attribute

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.