use of com.synopsys.integration.configuration.config.resolution.PropertyResolutionInfo in project synopsys-detect by blackducksoftware.
the class PropertyConfiguration method resolveFromPropertySources.
private PropertyResolution resolveFromPropertySources(@NotNull String key) {
Assert.notNull(key, "Cannot resolve a null key.");
for (PropertySource propertySource : orderedPropertySources) {
if (propertySource.hasKey(key)) {
String rawValue = propertySource.getValue(key);
if (rawValue != null) {
String name = propertySource.getName();
String origin = propertySource.getOrigin(key);
PropertyResolutionInfo propertyResolutionInfo = new PropertyResolutionInfo(name, origin, rawValue);
return new SourcePropertyResolution(propertyResolutionInfo);
}
}
}
return new NoPropertyResolution();
}
Aggregations