コード例 #1
0
 @Override
 public String getDocumentationUrl(AnnotatedParameter parameter, Object content) {
   final Expose expose = parameter.getAnnotation(Expose.class);
   String ret;
   if (content == null) {
     Class<?> clazz = parameter.getDeclaringClass();
     ret =
         getExposedUrl(
             parameter.getParameterName(), vocabFromClass(clazz), termsFromClazz(clazz), expose);
   } else {
     ret =
         getExposedUrl(
             parameter.getParameterName(), vocabFromBean(content), termsFromBean(content), expose);
   }
   return ret;
 }
コード例 #2
0
 /**
  * Gets exposed property or parameter name.
  *
  * @param inputParameter for exposure
  * @return property name
  */
 private String getExposedPropertyOrParamName(AnnotatedParameter inputParameter) {
   final Expose expose = inputParameter.getAnnotation(Expose.class);
   String property;
   if (expose != null) {
     property = expose.value();
   } else {
     property = inputParameter.getParameterName();
   }
   return property;
 }