Honestly I would probably have the class details somewhere else like a config file, and then generate the dot source for the graphviz picture. It’s not particularly human-friendly.