1 17 package org.apache.geronimo.tomcat; 18 19 import java.util.Iterator ; 20 import java.util.Map ; 21 import java.util.Set ; 22 23 import org.apache.tomcat.util.IntrospectionUtils; 24 25 public abstract class BaseGBean { 26 27 protected void setParameters(Object object, Map map){ 28 if (map != null){ 29 Set keySet = map.keySet(); 30 Iterator iterator = keySet.iterator(); 31 while(iterator.hasNext()){ 32 String name = (String )iterator.next(); 33 String value = (String )map.get(name); 34 35 IntrospectionUtils.setProperty(object, name, value); 36 } 37 } 38 39 } 40 41 } 42 | Popular Tags |