コード例 #1
0
 /**
  * value.
  *
  * @param cl a {@link java.lang.Class} object.
  * @param name a {@link java.lang.String} object.
  * @return a {@link java.lang.String} object.
  */
 public String value(Class<? extends Annotation> cl, String name) {
   IAnnotationModel annotation = originalType.getAnnotation(cl.getSimpleName());
   if (annotation != null) {
     return annotation.getValue(name);
   }
   return null;
 }
コード例 #2
0
  private boolean hasGlobalConsumes(ITypeModel type) {

    if (type.hasAnnotation(JAVAX_CONSUMES)) {
      return true;
    }
    IAnnotationModel apiAnn = type.getAnnotation(SWAGGER_API);
    if (apiAnn == null) {
      return false;
    }
    String consumes = apiAnn.getValue(JAVAX_CONSUMES.toLowerCase());
    if (consumes != null) {
      return true;
    }
    return false;
  }