use of org.reflections.Store in project reflections by ronmamo.
the class XmlSerializer method createDocument.
private Document createDocument(final Reflections reflections) {
Store map = reflections.getStore();
Document document = DocumentFactory.getInstance().createDocument();
Element root = document.addElement("Reflections");
for (String indexName : map.keySet()) {
Element indexElement = root.addElement(indexName);
for (String key : map.get(indexName).keySet()) {
Element entryElement = indexElement.addElement("entry");
entryElement.addElement("key").setText(key);
Element valuesElement = entryElement.addElement("values");
for (String value : map.get(indexName).get(key)) {
valuesElement.addElement("value").setText(value);
}
}
}
return document;
}
use of org.reflections.Store in project disconf by knightliao.
the class ScanPrinterUtils method printStoreMap.
/**
* 打印出StoreMap的数据
*/
public static void printStoreMap(Reflections reflections) {
LOGGER.info("Now we will print store map......");
Store store = reflections.getStore();
Map<String, Multimap<String, String>> /* indexName */
storeMap = store.getStoreMap();
for (String indexName : storeMap.keySet()) {
LOGGER.info("====================================");
LOGGER.info("indexName:" + indexName);
Multimap<String, String> multimap = storeMap.get(indexName);
for (String firstName : multimap.keySet()) {
Collection<String> lastNames = multimap.get(firstName);
LOGGER.info("\t\t" + firstName + ": " + lastNames);
}
}
}