public static boolean containsSame(Collection<? extends AnnotationMirror> c,AnnotationMirror anno){
  for (  AnnotationMirror an : c) {
    if (AnnotationUtils.areSame(an,anno)) {
      return true;
    }
  }
  return false;
}

public static boolean containsSame ( Collection < ? extends AnnotationMirror > c , AnnotationMirror anno ) { for ( AnnotationMirror an : c ) { if ( AnnotationUtils . areSame ( an , anno ) ) { return true ; } } return false ; }
checks that the collection contains the annotation . using collection . contains does not always work , because it does not use aresame for comparison .
