~/talk

Records, Not Just Constant Classes, A Deep Dive

Talkat EclipseCon 2022 · 2022-10-24..10-27· [java]
links:none on file
slides:none on file

Records are simple, implicitly final data classes that the compiler expands into private final fields, accessors and a canonical constructor, and it generates equals/hashCode/toString by emitting an invokeDynamic bootstrap call that delegates work to ObjectMethods. The language enforces errors (about 30–40 implemented in JDT), forbids instance fields and inheritance, supports compact constructor normalization, propagates component annotations to fields/accessors, and integrates with pattern matching; bytecode stays class-shaped so records do not give compact memory layout.

AI-written summary · about

  1. 0:00Records purpose
  2. 6:16Boilerplate to records
  3. 7:02Restricted identifiers in Java
  4. 8:49Records as constant classes
  5. 10:13Records extend java.lang.Record
  6. 11:18Record components behavior
  7. 13:10Record bytecode structure
  8. 16:26Constructors in records
  9. 17:32Static fields allowed
  10. 18:16Record annotations propagation
  11. 20:48Explicit accessors handling
  12. 21:09Canonical constructors
  13. 23:57Practical use cases
  14. 24:19Records in pattern matching
  15. 25:48Summary and future
  16. 26:31Q&A
~/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.