List of usage examples for org.springframework.core CollectionFactory createStringAdaptingProperties
@SuppressWarnings("serial") public static Properties createStringAdaptingProperties()
From source file:org.springframework.beans.factory.config.YamlProcessor.java
private boolean process(Map<String, Object> map, MatchCallback callback) { Properties properties = CollectionFactory.createStringAdaptingProperties(); properties.putAll(getFlattenedMap(map)); if (this.documentMatchers.isEmpty()) { if (logger.isDebugEnabled()) { logger.debug("Merging document (no matchers set): " + map); }// w w w .jav a 2 s .co m callback.process(properties, map); return true; } MatchStatus result = MatchStatus.ABSTAIN; for (DocumentMatcher matcher : this.documentMatchers) { MatchStatus match = matcher.matches(properties); result = MatchStatus.getMostSpecific(match, result); if (match == MatchStatus.FOUND) { if (logger.isDebugEnabled()) { logger.debug("Matched document with document matcher: " + properties); } callback.process(properties, map); return true; } } if (result == MatchStatus.ABSTAIN && this.matchDefault) { if (logger.isDebugEnabled()) { logger.debug("Matched document with default matcher: " + map); } callback.process(properties, map); return true; } if (logger.isDebugEnabled()) { logger.debug("Unmatched document: " + map); } return false; }