use of io.micronaut.inject.configuration.PropertyMetadata in project micronaut-core by micronaut-projects.
the class BeanDefinitionWriter method processConfigurationConstructorParameter.
private void processConfigurationConstructorParameter(ParameterElement parameter, AnnotationMetadata annotationMetadata) {
ClassElement parameterType = parameter.getGenericType();
if (!parameterType.hasStereotype(AnnotationUtil.SCOPE)) {
final PropertyMetadata pm = metadataBuilder.visitProperty(parameterType.getName(), parameter.getName(), parameter.getDocumentation().orElse(null), annotationMetadata.stringValue(Bindable.class, "defaultValue").orElse(null));
parameter.annotate(Property.class, (builder) -> builder.member("name", pm.getPath()));
}
}
Aggregations