export static functions. genExportStatic
support for downcasting!