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:
TimeoutStream
importsReadStream
-
distinguish between concrete and abstract types:
ReadStream
is abstract andTimeoutStream
is concrete -
add generic support if any on class model declaration:
ReadStream<T>
-
add inheritance support
-
generics:
TimeoutStream
extendsReadStream<Long>
, etc… -
super concrete type and super abstract types:
AsyncFile
extendsReadStream<Buffer>
andWriteStream<Buffer>
-