An howto for codegen.
Codegen is able to handle model generation for different kind of models:
-
module
-
package
-
class/interface types
-
dataobject
Any class/interface or dataobject always belons to a package and most importantly to a module
-
generate the target lang class files with an empty class and make them compile:
ReadStream -
generate imports, so each target class is able to import the classes it depends on:
TimeoutStreamimportsReadStream -
distinguish between concrete and abstract types:
ReadStreamis abstract andTimeoutStreamis concrete -
add generic support if any on class model declaration:
ReadStream<T> -
add inheritance support
-
generics:
TimeoutStreamextendsReadStream<Long>, etc… -
super concrete type and super abstract types:
AsyncFileextendsReadStream<Buffer>andWriteStream<Buffer>
-