ItemHintValueCondition Class — spring-boot Architecture
Architecture documentation for the ItemHintValueCondition class in Metadata.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
configuration-metadata/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/metadata/Metadata.java lines 317–356
static class ItemHintValueCondition extends Condition<ItemHint> {
private final int index;
private final Object value;
private final String description;
ItemHintValueCondition(int index, Object value, String description) {
this.index = index;
this.value = value;
this.description = description;
describedAs(createDescription());
}
private String createDescription() {
StringBuilder description = new StringBuilder();
description.append("value hint at index '").append(this.index).append("'");
if (this.value != null) {
description.append(" with value:").append(this.value);
}
if (this.description != null) {
description.append(" with description:").append(this.description);
}
return description.toString();
}
@Override
public boolean matches(ItemHint value) {
if (this.index + 1 > value.getValues().size()) {
return false;
}
ItemHint.ValueHint valueHint = value.getValues().get(this.index);
if (this.value != null && !this.value.equals(valueHint.getValue())) {
return false;
}
return this.description == null || this.description.equals(valueHint.getDescription());
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free