names.add(i.next()); }  Collections.sort(names);  Iterator i = names.iterator();  while(i.hasNext()) {
  public void setProperties(Map props) {    for (Iterator i = props.keySet().iterator(); i.hasNext(); ) {      try {        String propName = (String) i.next();        String propValue = (String) props.get(propName);        Property prop = getProperty(propName);        if (prop == null) {          if(log.isErrorEnabled()) {            log.error("Unknown property: " + propName + "=" + propValue + " in component " + this.toString());          }        } else {          Class propClass = prop.getPropertyClass();	  if (log.isDebugEnabled() && propClass == null) {	    log.debug("null prop class for Prop name: " + propName + ", value " + propValue + " property: " + prop.toString());	  }          Constructor constructor =             propClass.getConstructor(new Class[] {String.class});          Object value = constructor.newInstance(new Object[] {propValue});          prop.setValue(value);	  if (log.isDebugEnabled()) {	    log.debug("Setting value for property " + prop.getName().toString() + " with label " + prop.getLabel());	  }        }      } catch (Exception e) {	if (log.isErrorEnabled()) {	  log.error("Exception setting component properties", e);	}      }    }  }