Support NestedConfigurationProperty for record types

Add ElementType.RECORD_COMPONENT to NestedConfigurationProperty and
implement isMarkedAsNested for RecordParameterPropertyDescriptor.

This will allow nested records to be properly harvested for their
properties.

See gh-41251
This commit is contained in:
Alexis Couvreur
2024-06-26 13:51:38 -04:00
committed by Moritz Halbritter
parent efd1bd18b6
commit 47c8a859ea
6 changed files with 61 additions and 3 deletions

View File

@@ -50,7 +50,7 @@ class RecordParameterPropertyDescriptor extends ParameterPropertyDescriptor {
@Override
protected boolean isMarkedAsNested(MetadataGenerationEnvironment environment) {
return false;
return environment.getNestedConfigurationPropertyAnnotation(this.recordComponent) != null;
}
@Override