1 26 27 package org.objectweb.util.monolog.provider.lib.topics; 28 29 import java.io.PrintStream ; 30 import java.util.HashMap ; 31 import java.util.Iterator ; 32 33 import org.objectweb.util.monolog.provider.lib.LoggerProviderSingleton; 34 import org.objectweb.util.monolog.provider.lib.TopicProviderSingleton; 35 36 37 44 public class TopicTools { 45 46 50 static public void showAllTopics(PrintStream out){ 51 String [] tmp = LoggerProviderSingleton.getLoggerProvider().getTopics(); 52 out.println("configured Topics list"); 53 for (int i=0; i< tmp.length ; i++){ out.println(tmp[i]);} 54 } 55 56 60 static public void showAllUsedTopics(PrintStream out){ 61 String [] tmp = TopicProviderSingleton.getTopicProvider().getTopics(); 62 out.println("used Topics list"); 63 for (int i=0; i< tmp.length ; i++){ out.println(tmp[i]);} 64 } 65 66 70 static public void showAllUsedTopicsWithRef(PrintStream out){ 71 HashMap tmp = TopicProviderSingleton.getTopicProvider().getTopicsByRef(); 73 Iterator it = tmp.keySet().iterator(); 74 Class key = null; 75 String value = ""; 76 out.println("key\t\t\t\t|\tvalue"); 77 while(it.hasNext()){ 78 key = (Class )it.next(); 79 value = (String )tmp.get(key) ; 80 out.println(key + "\t" + value); 81 } 82 83 } 84 } 85 | Popular Tags |