@Override public String getDocumentationUrl(Field field, Object content) { final Expose expose = AnnotationUtils.getAnnotation(field, Expose.class); // TODO can we support Mixins from here? // final Class<?> mixin = provider.getConfig() // .findMixInClassFor(bean.getClass()); // final Expose mixinExpose = getAnnotation(mixin, Expose.class); return getExposedUrl(field.getName(), vocabFromBean(content), termsFromBean(content), expose); }
@Override public String getDocumentationUrl(Method method, Object content) { final Expose expose = AnnotationUtils.getAnnotation(method, Expose.class); // TODO can we support Mixins from here? // final Class<?> mixin = provider.getConfig() // .findMixInClassFor(bean.getClass()); // final Expose mixinExpose = getAnnotation(mixin, Expose.class); String methodName = method.getName(); String propertyName; if (methodName.startsWith("get")) { propertyName = StringUtils.uncapitalize(StringUtils.removeStart(methodName, "get")); } else { propertyName = StringUtils.uncapitalize(StringUtils.removeStart(methodName, "is")); } return getExposedUrl(propertyName, vocabFromBean(content), termsFromBean(content), expose); }