RFR: 8307652: sealed class hierarchy graph doesn't distinguish non-sealed classes

Per Minborg pminborg at openjdk.org
Mon May 15 06:49:44 UTC 2023


On Tue, 9 May 2023 04:11:03 GMT, Chen Liang <liach at openjdk.org> wrote:

> `@sealedGraph` had a mechanism to render non-sealed classes differently, but it's useless because the graph nodes are not bordered. This patch converts the non-sealed classes to be rendered in italics instead.
> 
> An example of `ConstantDesc`, which has a sealed hierarchy except `DynamicConstantDesc`:
> JDK 20:
> ![image](https://user-images.githubusercontent.com/7806504/236991678-e30c181a-cb1f-407a-b3e0-f648fe2df788.png)
> 
> This patch:
> ![image](https://user-images.githubusercontent.com/7806504/236991592-affcb128-9721-45cf-860c-6292ee6a8bb6.png)

Thanks for this improvement suggestion. Indicating "openness" is certainly important. I was playing around with various ways of expressing it and came up with this:

![image](https://github.com/openjdk/jdk/assets/7457876/3f5204b5-7dd7-47ee-9df4-397c5b69f0d4)

What is your opinion on it? It might be slightly more intuitive? We could even do this:

![image](https://github.com/openjdk/jdk/assets/7457876/32e2542f-ef81-4523-a658-d0a39da13ea8)



Here is the code:



digraph G {

 shape="none"
 rankdir = "BT"
 
 ClassDesc -> ConstantDesc
 MethodHandleDesc -> ConstantDesc
 DirectMethodHandleDesc -> MethodHandleDesc
 DynamicConstantDesc -> ConstantDesc
 Float -> ConstantDesc
 Hidden1 -> DynamicConstantDesc [style="dashed"]
 
 Hidden1 [label="<any>"]
 
  ClassDesc [shape=none];
  ConstantDesc [shape=none];
  MethodHandleDesc [shape=none];
  DynamicConstantDesc [shape=none];
  DirectMethodHandleDesc [shape=none];
  Float [shape=none];
  Hidden1 [shape=none];
}

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13877#issuecomment-1547278887



More information about the build-dev mailing list