Files
pkl/pkl-codegen-java
translatenix cbbcca0d84 codegen-java: Make stateless classes instantiable (#734)
Motivation:
Currently, the condition for making a generated Java class instantiable is "class is neither abstract nor stateless".
(An instantiable class receives a public constructor and equals/hashCode/toString/with methods.)
This is inconsistent with Pkl and codegen-kotlin, both of which support instantiation of stateless classes.

Changes:
Widen condition for making a class instantiable to "class is neither abstract nor a stateless final module class".
This is consistent with codegen-kotlin, which generates object declarations (only) for stateless final module classes.

Result:
Stateless classes are instantiable in Pkl, codegen-java, and codegen-kotlin.
2024-10-24 09:29:08 -07:00
..
2024-10-17 09:12:07 -07:00