1 6 7 package analyzer.listeners; 8 9 import java.util.HashSet ; 10 import java.util.Iterator ; 11 12 16 public class WMAnalyzer extends WMParser{ 17 18 HashSet names; 19 20 21 public WMAnalyzer(String pathAndTS) { 22 super(pathAndTS); 23 } 24 25 protected void init(){ 26 names=new HashSet (); 27 } 28 29 protected void eof(){ 30 Iterator it=names.iterator(); 31 if(!it.hasNext()){ 32 System.out.println("nothing"); 33 return; 34 } 35 System.out.println("***WM\nMagnified: "); 36 while(it.hasNext()) System.out.println(" + "+(String )it.next()); 37 System.out.println("***"); 38 } 39 40 protected void analyzeMax(String s){ 41 names.add((Object )s); 42 } 43 44 } 45 | Popular Tags |