/** * Prints the content of map of properties to the system output identifying the source of each property. */ public void debugContent() { debugContent(System.out); }
/** * Prints the content of map of properties to the system output identifying the source of each property. */ @Override public void debugContent() { getProperties().debugContent(); }
/** * Prints the content of map of properties to the specific output identifying the source of each property. */ @Override public void debugContent(@Nonnull Appendable out) { getProperties().debugContent(out); }
/** * Prints the content of map of properties to the specific output identifying the source of each property. */ public void debugContent(@Nonnull Appendable out) { Multimap<PropertySource<?>, PropertyEntry> entriesBySource = LinkedHashMultimap.create(); loadEntries(entriesBySource); try { String lineSeparator = System.getProperty("line.separator"); for (PropertySource<?> source : entriesBySource.keySet()) { out.append('#').append(lineSeparator); out.append("#source '").append(source.getDescription()).append("'"); out.append(lineSeparator); debugContent(entriesBySource.get(source), out, lineSeparator); } } catch (IOException e) { throw new SingularPropertyException("Error writing to output", e); } }