for(int i=0; i < nParameters; i++) { if (getProperty(PROP_PARAM + i) != null) self.addParameter(getProperty(PROP_PARAM + i).getValue());
Iterator names = getSortedLocalPropertyNames(); while (names.hasNext()) { CompositeName cname = (CompositeName) names.next(); String name = cname.toString(); if (log.isDebugEnabled()) { log.debug("Looking at property " + name); } if (name.indexOf(PROP_PARAM) != -1) { if (log.isDebugEnabled()) { log.debug("Found parameter " + name); } self.addParameter(getProperty(cname).getValue()); }
  public ComponentData addComponentData(ComponentData data) {    // Warning: This assumes it has been handed the component in    // which to add itself    if (data.getType() != ComponentData.AGENT && data.getType() != ComponentData.NODE) {      if (log.isErrorEnabled()) {	log.error("Asked to add to non Agent/Node: " + data);      }      return data;    }    // Create a new componentdata    // set the type, etc appropriately    // set self as the owner    // set data as the parent    // add self to data    ComponentData self = new GenericComponentData();    // If the user specified the long version of common insertion points,    // translate to the short version for consistency    if (getComponentType().equalsIgnoreCase("Node.AgentManager.Binder")) {      self.setType(ComponentData.NODEBINDER);    } else if (getComponentType().equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Binder")) {      self.setType(ComponentData.AGENTBINDER);    } else if (getComponentType().equalsIgnoreCase("Node.AgentManager.Agent.PluginManager.Plugin")) {      self.setType(ComponentData.PLUGIN);    } else if (getComponentType().equalsIgnoreCase("Node.AgentManager.Agent")) {      self.setType(ComponentData.AGENT);    } else {      self.setType(getComponentType());    }    self.setOwner(this);    self.setParent(data);    self.setClassName(getComponentClassName());    for(int i=0; i < nParameters; i++) {      if (getProperty(PROP_PARAM + i) != null)	self.addParameter(getProperty(PROP_PARAM + i).getValue());    }    if (alreadyAdded(data, self)) {      if (log.isDebugEnabled()) {	log.debug(data.getName() + " already has component " + self);      }      return data;    }    self.setName(uniqueName(data, self));    data.addChildDefaultLoc(self);    return data;  }