~ubuntu-branches/ubuntu/vivid/proguard/vivid

« back to all changes in this revision

Viewing changes to src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2014-08-21 07:55:44 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20140821075544-d45gblwh2wwvb2yb
Tags: 5.0-1
* Team upload.
* New upstream release (Closes: #754964)
  - Increased the source/target level to 1.5
  - Depend on java5-runtime instead of java2-runtime

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * ProGuard -- shrinking, optimization, obfuscation, and preverification
3
3
 *             of Java bytecode.
4
4
 *
5
 
 * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu)
 
5
 * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu)
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify it
8
8
 * under the terms of the GNU General Public License as published by the Free
21
21
package proguard.classfile.attribute.annotation;
22
22
 
23
23
import proguard.classfile.*;
24
 
import proguard.classfile.attribute.Attribute;
 
24
import proguard.classfile.attribute.*;
25
25
import proguard.classfile.attribute.annotation.visitor.AnnotationVisitor;
26
26
 
27
27
/**
44
44
 
45
45
 
46
46
    /**
47
 
     * Creates an initialized AnnotationsAttribute. 
 
47
     * Creates an initialized AnnotationsAttribute.
48
48
     */
49
49
    protected AnnotationsAttribute(int          u2attributeNameIndex,
50
50
                                   int          u2annotationsCount,
97
97
            annotationVisitor.visitAnnotation(clazz, method, annotations[index]);
98
98
        }
99
99
    }
 
100
 
 
101
 
 
102
    /**
 
103
     * Applies the given visitor to all code attribute annotations.
 
104
     */
 
105
    public void annotationsAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, AnnotationVisitor annotationVisitor)
 
106
    {
 
107
        for (int index = 0; index < u2annotationsCount; index++)
 
108
        {
 
109
            // We don't need double dispatching here, since there is only one
 
110
            // type of Annotation.
 
111
            annotationVisitor.visitAnnotation(clazz, method, codeAttribute, annotations[index]);
 
112
        }
 
113
    }
100
114
}