Class RecordDeclaration

java.lang.Object

public class RecordDeclaration extends AbstractTypeDeclaration
Record declaration AST node type (added in JLS16 API).
 RecordDeclaration:
     [ Javadoc ] { ExtendedModifier } record Identifier
                [ < TypeParameter > ]
                (
                [ FormalParameter { , FormalParameter } ]
                ) { Dimension }
                [ implements Type { , Type } ]
                [ ; { RecordBodyDeclaration | ; } ]
 
The AbstractUnnamedTypeDeclaration.bodyDeclarations() list holds the class body declarations that appear after the semicolon.

When a Javadoc comment is present, the source range begins with the first character of the "/**" comment delimiter. When there is no Javadoc comment, the source range begins with the first character of the first modifier or annotation (if present), or the first character of the "record" keyword (if no modifiers or annotations). The source range extends through the last character of the "}" token following the body declarations.

Since:
3.26