예제 #1
0
 protected boolean isBusinessMeaningful(ProgramElementDoc doc) {
   final AnnotationDesc[] annotations = doc.annotations();
   for (AnnotationDesc annotation : annotations) {
     if (isBusinessMeaningful(annotation.annotationType())) {
       return true;
     }
   }
   return false;
 }
예제 #2
0
 /**
  * Return true if the given Doc is deprecated.
  *
  * @param doc the Doc to check.
  * @return true if the given Doc is deprecated.
  */
 public static boolean isDeprecated(ProgramElementDoc doc) {
   if (doc.tags("deprecated").length > 0) {
     return true;
   }
   AnnotationDesc[] annotationDescList = doc.annotations();
   for (int i = 0; i < annotationDescList.length; i++) {
     if (annotationDescList[i]
         .annotationType()
         .qualifiedName()
         .equals(java.lang.Deprecated.class.getName())) {
       return true;
     }
   }
   return false;
 }
예제 #3
0
 public static AnnotationDesc findAnnotation(
     final ProgramElementDoc programElementDoc, final Class<?>... soughtAnnotations) {
   return findAnnotation(programElementDoc.annotations(), soughtAnnotations);
 }