1 18 package net.sf.uitags.tagutil.bean; 19 20 import java.lang.reflect.Method ; 21 import java.util.ArrayList ; 22 import java.util.HashMap ; 23 import java.util.Iterator ; 24 import java.util.List ; 25 import java.util.Map ; 26 27 28 35 public abstract class ElTagBeanInfo extends TagBeanInfo { 36 46 List getTagHandlerSetters() { 47 List methods = super.getTagHandlerSetters(); 48 49 Map methodMap = new HashMap (); 51 for (Iterator i = methods.iterator(); i.hasNext(); ) { 52 Method currMethod = (Method ) i.next(); 53 String methodName = currMethod.getName(); 54 55 Method similarlyNamed = (Method ) methodMap.get(methodName); 56 if (similarlyNamed == null) { 58 methodMap.put(methodName, currMethod); 59 } 60 else { 63 if (currMethod.getParameterTypes()[0].equals(String .class)) { 64 methodMap.put(methodName, currMethod); 65 } 66 } 67 } 68 69 return new ArrayList (methodMap.values()); 70 } 71 } 72 | Popular Tags |