code: public boolean isDeclarationAnnotation(AnnotationTypeDoc annotationDoc,
              boolean isJava5DeclarationLocation) {
          if (!isJava5DeclarationLocation)
              return false;
          AnnotationDesc[] annotationDescList = annotationDoc.annotations();
          // Annotations with no target are treated as declaration as well
          if (annotationDescList.length==0)
              return true;
          for (AnnotationDesc anno : annotationDescList) {
              if (anno.annotationType().qualifiedName().equals(
                      Target.class.getName())) {
                  if (isDeclarationTarget(anno))
                      return true;
              }
          }
          return false;
      }
docs: Returns true if the {@code annotationDoc} is to be treated
  as a declaration annotation, when targeting the
  {@code elemType} element type.
  
  @param annotationDoc the annotationDoc to check
  @param elemType  the targeted elemType
  @return true if annotationDoc is a declaration annotation