View Javadoc
1   package mockit.asm.metadata;
2   
3   import edu.umd.cs.findbugs.annotations.NonNull;
4   import edu.umd.cs.findbugs.annotations.Nullable;
5   
6   import java.util.List;
7   
8   import mockit.asm.metadata.ClassMetadataReader.AnnotationInfo;
9   
10  class ObjectWithAttributes {
11      @Nullable
12      public List<AnnotationInfo> annotations;
13  
14      public final boolean hasAnnotation(@NonNull String annotationName) {
15          if (annotations != null) {
16              for (AnnotationInfo annotation : annotations) {
17                  if (annotationName.equals(annotation.name)) {
18                      return true;
19                  }
20              }
21          }
22  
23          return false;
24      }
25  }