What are the best Java code generation tools or plugins to use in Eclipse?

后端 未结 12 2124
灰色年华
灰色年华 2021-01-30 23:43

I\'m aware of the built in code generation and refactoring one can do with the \"Source\" and \"Refactor\" menu items in Eclipse.

I also use the Commonclipse plugin to

相关标签:
12条回答
  • 2021-01-31 00:06

    You can look at http://fast-code.sourceforge.net/ for spring based applications. You can create FooService and FooServiceImpl and the configurations just by typing foo. It has nice way to create unit tests as well. One can see all the templates here : http://fast-code.sourceforge.net/templates-config.xml

    0 讨论(0)
  • 2021-01-31 00:09

    Here are three java code generators that you may find interesting :

    • picocog : A tiny code generation library (< 8 KB) written in Java, useful for any purpose, but ideal for JSR-269. There are tutorials available at dev.to and dzone.com.

    • The JmrTeam generator : Jet Model Robotization available for Eclipse (coming soon for IDEA), useful for managing and generating code in any kind of project(Maven, Gradle, Java, Python, Php etc.), any kind of framework(springboot/spring/springMVC, React/ Vue/Angular, hibernate, mybatis, struts, JPA etc.).

    • javapoet : A Java API for generating .java source files.

    • jhipster :An open Source application platform for creating Spring Boot + Angular/React/Vue projects. The generator source code is available here

    0 讨论(0)
  • 2021-01-31 00:10

    Telosys ( http://www.telosys.org/ ) is a simple and efficient tool for Java code generation.

    This code generator is available as an Eclipse Plugin (http://marketplace.eclipse.org/content/telosys-tools) and also as a Command Line Interface (https://github.com/telosys-tools-bricks/telosys-cli/wiki).

    The model defining all the entities can be created from scratch (DSL text model) or from an existing database (DB model).

    The templates are based on Velocity (http://velocity.apache.org) and can be downloaded from GitHub. All the templates are customizable and new templates can be created from scratch if necessary. Existing templates can generate code forJPA, Spring MVC, Database documentation, REST API, etc.

    0 讨论(0)
  • 2021-01-31 00:11

    I just released my personal Java code generator: JCG. You can find it at

    https://github.com/makkax/JavaCodeGenerator

    It's a generator written in Java where you directly code all Java types, fields, methods & annotations without the need of templates.

    With JCG you can easily generate any number of Java types with complex interdependencies.

    0 讨论(0)
  • 2021-01-31 00:17

    Eclipse Xtend is a very powerful code generator that, among other things, supports closures and data classes - automatic getters/setters/hashCode/equals.

    0 讨论(0)
  • 2021-01-31 00:18

    If your are interested in going a bit further with code generation and getting into model driven software development you should have a look at openArchitectureWare.

    If you work through the Getting Started tutorial you should get up to speed pretty quickly.

    0 讨论(0)
提交回复
热议问题