Skip to content
Lukas Görlach edited this page Jun 25, 2015 · 41 revisions

CobiGen - Code-based incremental Generator

What is CobiGen?

CobiGen is a generic generator for coping with generation tasks in Java projects. Due to a template-based generation approach, CobiGen is able to generate any text-based documents and document fragments. All CobiGen needs is a valid input file like a Java class and templates, which specify the text to be generated. See our CobiGen applications for examples what CobiGen could do for you and your project!

Input:

  • Java classes

  • …​ possibly more inputs like wsdl, which is currently not implemented.

Output:

  • any text-based document or document fragments

Features & Characteristics:

  • Generate code as newly create files

  • Merging of code if the file to generate already exists. E.g. generate new methods into existing java classes or adding nodes to an XML file. Merging of contents into existing files will be done using structural merge mechanisms.

  • Structural merge mechanisms are currently implemented for Java, XML (rudimentary), Java Property Syntax

  • Conflicts can be resolved individually but automatically by former configuration for each template

  • CobiGen provides an Eclipse integration

  • CobiGen comes with an extensive documentation for users and developers

  • Projects using CobiGen will benefit from all maintenance updates

Current and past CobiGen applications (a selection)

  • Generation of a Java CRUD application based on OASP4 architecture including all server layers together with a client application. You can find details here.

  • Generation of a Java CRUD application according to the Register Factory architecture. Hibernate entities were the input for the generation.

  • Generation of an additional Java type hierarchy on top of existing Java classes in combination with additional methods to be integrated in the modified classes. Input and output were also here the Hibernate entites.

  • Generation of hash- and equals-methods as well as copy constructors dependending on the field types of the input Java class. Furthermore CobiGen is able to re-generate these methods/constructors triggered by the user, i.e, when fields have been changed.

  • Generation of builder classes for generating testdata for JUnit-Tests. Input are the Hibernate entities.

  • Extraction of JavaDoc of test classes and their methods for generating an csv document. Afterwards this document can be opened in Excel for further test documentation and maintenance.

Clone this wiki locally