Skip to content
Malte Brunnlieb edited this page Jun 28, 2015 · 41 revisions

CobiGen - Code-based incremental Generator

Overview

CobiGen is a generic incremental generator for end to end code generation tasks, mostly used in Java projects. Due to a template-based approach, CobiGen generates any set of text-based documents and document fragments. See CobiGen applications for examples how CobiGen has been used in the past and how it could help your project!

Input:

  • Java classes

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

Output:

  • any text-based document or document fragments depending on template

Features and Characteristics

  • Generate fresh files across all the layers of a application - ready to run.

  • Add on to existing files merging code into it. 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, Java Property Syntax.

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

  • CobiGen provides an Eclipse integration as well as a Maven Integration.

  • CobiGen comes with an extensive documentation for users and developers.

  • templates can be fully tailored to project needs - this is considered a simple task.

Selection of current and past CobiGen applications

  • Generation of a Java CRUD application based on OASP architecture including all software-layers on the server plus code for js-clients (AngularJs + SenchaJs). 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