in maven-jxr/src/main/java/org/apache/maven/jxr/JavaCodeTransform.java [538:574]
private String uriFilter(String line) {
for (String scheme : VALID_URI_SCHEMES) {
int index = line.indexOf(scheme);
if (index != -1) {
int start = index;
int end = -1;
for (int j = start; j < line.length(); ++j) {
char current = line.charAt(j);
if (!Character.isLetterOrDigit(current) && isInvalidURICharacter(current)) {
end = j;
break;
}
end = j;
}
// now you should have the full URI so you can replace this
// in the current buffer
if (end != -1) {
String uri = (end + 1 == line.length()) ? line.substring(start) : line.substring(start, end);
line = line.replace(uri, "<a href=\"" + uri + "\" target=\"alexandria_uri\">" + uri + "</a>");
}
}
}
// if we are in a multiline comment we should not call JXR here.
if (!inMultiLineComment && !inJavadocComment) {
return jxrFilter(line);
}
return line;
}