ItemHintProviderCondition Class — spring-boot Architecture
Architecture documentation for the ItemHintProviderCondition 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 358–405
static class ItemHintProviderCondition extends Condition<ItemHint> {
private final int index;
private final String name;
private final Map<String, Object> parameters;
ItemHintProviderCondition(int index, String name, Map<String, Object> parameters) {
this.index = index;
this.name = name;
this.parameters = parameters;
describedAs(createDescription());
}
String createDescription() {
StringBuilder description = new StringBuilder();
description.append("value provider");
if (this.name != null) {
description.append(" with name:").append(this.name);
}
if (this.parameters != null) {
description.append(" with parameters:").append(this.parameters);
}
return description.toString();
}
@Override
public boolean matches(ItemHint hint) {
if (this.index + 1 > hint.getProviders().size()) {
return false;
}
ItemHint.ValueProvider valueProvider = hint.getProviders().get(this.index);
if (this.name != null && !this.name.equals(valueProvider.getName())) {
return false;
}
if (this.parameters != null) {
for (Map.Entry<String, Object> entry : this.parameters.entrySet()) {
if (!IsMapContaining.hasEntry(entry.getKey(), entry.getValue())
.matches(valueProvider.getParameters())) {
return false;
}
}
}
return true;
}
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free