How to generate java code base on stereotypes?

Hi,guys:
when bunch of classes extends(generalizes) from same parent class,if drawing all generalization lines,diagram will become messy,to avoid that,I am wondering if I could use stereotype to represent this relationship,say,"<>" represents the parent of class is Composite,then when generating java code,I hope this will be “translated” to “public class CLZ extends Composite…”,How can I do to make this happen,or any other handy way fit my requirement?Thank you