KnownAncestorsConfigurationPropertySource Class — spring-boot Architecture
Architecture documentation for the KnownAncestorsConfigurationPropertySource class in KnownAncestorsConfigurationPropertySource.java from the spring-boot codebase.
Entity Profile
Source Code
core/spring-boot/src/test/java/org/springframework/boot/context/properties/source/KnownAncestorsConfigurationPropertySource.java lines 26–60
class KnownAncestorsConfigurationPropertySource implements ConfigurationPropertySource {
private final Map<ConfigurationPropertyName, ConfigurationPropertyState> ancestors = new HashMap<>();
@Override
public @Nullable ConfigurationProperty getConfigurationProperty(ConfigurationPropertyName name) {
return null;
}
@Override
public ConfigurationPropertyState containsDescendantOf(ConfigurationPropertyName name) {
ConfigurationPropertyState state = this.ancestors.get(name);
assertThat(state).isNotNull();
return state;
}
KnownAncestorsConfigurationPropertySource absent(ConfigurationPropertyName name) {
return ancestor(name, ConfigurationPropertyState.ABSENT);
}
KnownAncestorsConfigurationPropertySource present(ConfigurationPropertyName name) {
return ancestor(name, ConfigurationPropertyState.PRESENT);
}
KnownAncestorsConfigurationPropertySource unknown(ConfigurationPropertyName name) {
return ancestor(name, ConfigurationPropertyState.UNKNOWN);
}
private KnownAncestorsConfigurationPropertySource ancestor(ConfigurationPropertyName name,
ConfigurationPropertyState state) {
this.ancestors.put(name, state);
return this;
}
}
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free