Generator for metadata class source code