* Override links to JAX-RS methods to output method + path text and an appropriate resource page link. POJO DTO pages are generated using
* the standard page location conventions, so the default works for them.
*/
@Override
public String seeTagToString(SeeTag tag) {
Resource res = null;
String linkText = null;
String hash = null;
if (tag.referencedClassName() != null) {
final ClassDoc cDoc = tag.referencedClass();
if (cDoc == null) {
// JavaDoc was unable to locate the DTO/resource class
return invalidLink(tag, String.format("can't find referenced class %s", tag.referencedClassName()));
}
// Check for a resource class first
res = application.findResourceClass(cDoc);
if (res != null) {
linkText = Utils.getAbsolutePath(this.config, res);
}
// If we found a resource class, then we can look further for a resource method
if ((res != null) && (tag.referencedMemberName() != null)) {
MemberDoc member = tag.referencedMember();
if (member == null) {
// No point looking if JavaDoc can't find the member
return invalidLink(tag, String.format("can't find resource method %s in %s", tag.referencedMemberName(), cDoc.qualifiedName()));
}
if (member instanceof MethodDoc) {
// Check for a resource method
res = application.findResourceForMethod(cDoc, (MethodDoc) member);
if (res != null) {
ResourceMethod rMethod = res.findMethod((MethodDoc) member);
if (rMethod != null) {
linkText = getDisplayText(res, rMethod);
hash = rMethod.getMethods().get(0);
}
}