Closed xeals closed 2 years ago
The 0.13.0 release will add basic support for records. Record class docs will be retained, as well as docs for secondary constructors and other methods and fields defined in the record.
There will also be a new method ClassJavadoc.getRecordComponents()
that returns any @param
tags from the class docs.
I filed #60 for attaching docs to the canonical constructor and generated component accessors.
Version 0.13.0 with basic support for records is now live on Maven Central.
Record classes are unmodifiable data class introduced in Java 16 and included in the recent LTS version Java 17. Since records are a new syntax for Java, they generate an
ElementKind.RECORD
AST element instead ofElementKind.CLASS
and are not supported by the current visitor.Javadoc for a record is the same as a regular class, except it may include
@param
fields referring to record components:General thoughts:
Depending on how an implementation might balance representation vs. intent:
GENERATED
orRECORD
flags set on the method (which I think is specified, but I can't find the exact mention in the JVM spec)@param
tags from the primary constructor could be applied to the fields and/or methods