Extract TypeName class.
Add basic support for DTO/domain inheritance.