} else {
// we have an id already, pull off the kind
kind = component.toString();
}
// add the parsed name component
components.add(new NameComponent(id, kind));
// make sure these are all reset after pulling off a component
component.setLength(0);
id = null;
kind = null;
} else {
component.append(ch);
}
}
// parse the last section
// not seen a id/kind separator yet? This is an id with no kind
if (id == null) {
id = component.toString();
kind = "";
} else {
// we have an id already, pull off the kind
kind = component.toString();
}
// add the parsed name component
components.add(new NameComponent(id, kind));
// and turn this into a component array
return (NameComponent[])components.toArray(new NameComponent[components.size()]);
}