The only way that i've seen this done is creating a builder for the class you want to use then execute the SaveAsClass() method. Even then, if you talking about a class like the data environment or cursor oject you would have to create a wrapper class that would act as the dataenvironment - during runtime it would programatically create the data environment and add the cursor objects then execute the OpenTables() method.
This methodology is "lighting fast" because during runtime you're simply assigning values to a bunch of properties then executing the OpenTables() method.