use of org.gradle.api.internal.tasks.properties.PropertyValueVisitor in project gradle by gradle.
the class AbstractNestedRuntimeBeanNode method visitProperties.
public void visitProperties(PropertyVisitor visitor, PropertySpecFactory specFactory, final Queue<RuntimeBeanNode<?>> queue, final RuntimeBeanNodeFactory nodeFactory) {
TypeMetadata typeMetadata = getTypeMetadata();
for (final PropertyMetadata propertyMetadata : typeMetadata.getPropertiesMetadata()) {
PropertyValueVisitor propertyValueVisitor = propertyMetadata.getPropertyValueVisitor();
if (propertyValueVisitor == null) {
continue;
}
String propertyName = getQualifiedPropertyName(propertyMetadata.getFieldName());
PropertyValue propertyValue = new DefaultPropertyValue(propertyName, propertyMetadata.getAnnotations(), getBean(), propertyMetadata.getMethod());
propertyValueVisitor.visitPropertyValue(propertyValue, visitor, specFactory, new BeanPropertyContext() {
@Override
public void addNested(String propertyName, Object bean) {
queue.add(nodeFactory.create(AbstractNestedRuntimeBeanNode.this, propertyName, bean));
}
});
}
}
Aggregations