3 ms·
You picked a project that (A) is literally older than the sun, (B) targets Java 11, a version from 5 years ago, and (C) the file is generated. Right at the top
by vips7L 2y ago
You picked a project that (A) is literally older than the sun, (B) targets Java 11, a version from 5 years ago, and (C) the file is generated.
Right at the top of the file...
> /* QueryParser.java /
/ Generated By:JavaCC: Do not edit this line. QueryParser.java */
I'm not claiming you're not going to see properties written out. I'm just saying that's not the majority of code you're going to see and to claim that idiomatic Java is all getters and setters is a bit far fetched.
Here is what I would consider modern idiomatic Java, immutable records and immutable classes that may expose some of their state:
https://github.com/jstachio/jstachio/blob/main/compiler/apt/src/main/java/io/jstach/apt/Section.java https://github.com/jstachio/jstachio/blob/main/compiler/apt/...
https://github.com/jstachio/jstachio/blob/main/compiler/apt/src/main/java/io/jstach/apt/NamedReader.java https://github.com/jstachio/jstachio/blob/main/compiler/apt/...