diff options
author | Brian Carlstrom <bdc@google.com> | 2015-01-08 08:24:06 -0800 |
---|---|---|
committer | Brian Carlstrom <bdc@google.com> | 2015-01-08 10:29:11 -0800 |
commit | cd9e071098d0539dda3a4a5d3f45cfd8814de4ed (patch) | |
tree | 9ac962825d41c4fb8ad1ec0fc2e8b441b42d3869 /src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java | |
parent | 9961286c06c25cd03464d3e2b00bd9b9dedf96ba (diff) | |
download | proguard-cd9e071098d0539dda3a4a5d3f45cfd8814de4ed.tar.gz |
Upgrade Proguard to 5.1.
Downloaded from:
http://sourceforge.net/projects/proguard/files/proguard/5.1/
Bug: 17550647
(cherry picked from commit 2270795fbe0b277bfd49f40950ecaa78583175cc)
Change-Id: I4d4c6b4f11aca8d5595b7f285c675bc5873d5e24
Diffstat (limited to 'src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java')
-rw-r--r-- | src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java b/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java index a936ff4..dcb7cf6 100644 --- a/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java +++ b/src/proguard/classfile/attribute/annotation/AnnotationsAttribute.java @@ -2,7 +2,7 @@ * ProGuard -- shrinking, optimization, obfuscation, and preverification * of Java bytecode. * - * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu) + * Copyright (c) 2002-2014 Eric Lafortune (eric@graphics.cornell.edu) * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -21,7 +21,7 @@ package proguard.classfile.attribute.annotation; import proguard.classfile.*; -import proguard.classfile.attribute.Attribute; +import proguard.classfile.attribute.*; import proguard.classfile.attribute.annotation.visitor.AnnotationVisitor; /** @@ -44,7 +44,7 @@ public abstract class AnnotationsAttribute extends Attribute /** - * Creates an initialized AnnotationsAttribute. + * Creates an initialized AnnotationsAttribute. */ protected AnnotationsAttribute(int u2attributeNameIndex, int u2annotationsCount, @@ -97,4 +97,18 @@ public abstract class AnnotationsAttribute extends Attribute annotationVisitor.visitAnnotation(clazz, method, annotations[index]); } } + + + /** + * Applies the given visitor to all code attribute annotations. + */ + public void annotationsAccept(Clazz clazz, Method method, CodeAttribute codeAttribute, AnnotationVisitor annotationVisitor) + { + for (int index = 0; index < u2annotationsCount; index++) + { + // We don't need double dispatching here, since there is only one + // type of Annotation. + annotationVisitor.visitAnnotation(clazz, method, codeAttribute, annotations[index]); + } + } } |