Weapon for Boilerplate Destruction

Annotation Processor

František Gažo

github.com/FrantisekGazo

 

Libraries generate code

  • ButterKnife
  • AutoValue
  • Dagger2
  • Realm

2 methods

  • Annotation Processing
  • Bytecode Weawing

Annotation Processing

  • available since Java 5 but a usable since Java 6
  • create new .java files
  • easy to debug and test

Bytecode Weawing

  • create new or modify existing .class files
  • cannot debug and hard to test
  • Transform API - since Gradle plugin 1.5.0-beta1

Annoation Processor

Code

Thank you

Annotation Processor

By František Gažo

Annotation Processor

  • 812