8317937: @sealedGraph: Links to inner classes fails in links
Reviewed-by: pminborg
This commit is contained in:
parent
134c382d39
commit
4a0ad462ab
@ -229,7 +229,7 @@ public final class SealedGraph implements Taglet {
|
||||
var forwardNavigator = nodePackage.getQualifiedName().toString()
|
||||
.replace(".", "/");
|
||||
|
||||
return backNavigator + forwardNavigator + "/" + node.getSimpleName() + ".html";
|
||||
return backNavigator + forwardNavigator + "/" + packagelessCanonicalName(node) + ".html";
|
||||
}
|
||||
|
||||
public void addEdge(TypeElement node, TypeElement subNode) {
|
||||
@ -315,5 +315,14 @@ public final class SealedGraph implements Taglet {
|
||||
case MEMBER -> packageName((TypeElement) element.getEnclosingElement());
|
||||
};
|
||||
}
|
||||
|
||||
private static String packagelessCanonicalName(TypeElement element) {
|
||||
String result = element.getSimpleName().toString();
|
||||
while (element.getNestingKind() == NestingKind.MEMBER) {
|
||||
element = (TypeElement) element.getEnclosingElement();
|
||||
result = element.getSimpleName().toString() + '.' + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user