We use delegation to share code (and have only one bit of code to maintain) rather than subclassing or superclassing (forces AST support code to be loaded even when you don't want to do AST stuff).
Typically, setASTNodeType is used to specify the homogeneous type of node to create, but you can override create() to make heterogeneous nodes etc...