~/talk

Annotation Processing

Talkat Droidcon Dubai 2018 · on Friday, 2018-04-13· [compilers-and-language-design, java]
links:none on file
slides:none on file

Creates a compile‑time annotation processor (Java APT, run in a separate plain‑Java Gradle module) that generates BundleBinder classes for activities by scanning @BundleBind on classes and @BindValue on fields, writing string‑built or JavaPoet code via the filer and formatting with Google Java Format. Solves a real case of ~200 validated fields by avoiding reflection and runtime cost, supports rounds and incremental edits (rebuild regenerates code), and can block compilation for @InProgress classes by emitting messager errors. Registration uses META‑INF/services.

AI-written summary · about

  1. 0:00Introduction to talk
  2. 1:27What are annotations
  3. 3:58Why write custom processors
  4. 8:14Benefits of code generation
  5. 13:08Annotation Processing Tool basics
  6. 16:47Demo setup and Gradle setup
  7. 26:07Live coding demo start
  8. 30:22Processor implementation
  9. 33:12Testing generated code
  10. 35:23Adding validation logic
  11. 37:09Renaming fields dynamically
  12. 38:14Creating in-progress annotation
  13. 43:00Q&A and closing remarks
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.