Skip to content

Instantly share code, notes, and snippets.

@codethereforam
Created January 31, 2019 03:58
Show Gist options
  • Save codethereforam/eb4353e183f88995971e5a06b335cb31 to your computer and use it in GitHub Desktop.
Save codethereforam/eb4353e183f88995971e5a06b335cb31 to your computer and use it in GitHub Desktop.
Java生成代码(字节码)

一、方式

  1. 代码生成器 & IDE
  2. 编译时代码生成: Pluggable Annotation Processing API
  3. 运行时代码生成: Compiler API
  4. 运行时生成字节码: cglib, javassist

二、辅助工具

  • String format tool
  • 模板引擎: freemarker, velocity
  • JavaPoet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment