List memberNames = null;
int lastMinusIndex = -1;
MemberName lastMemberName = null;
do {
int minusIndex = referenceString.indexOf(MEMBER_SEPARATOR, lastMinusIndex + 1);
// Extract next name component
String component;
if (minusIndex != -1) {
// If minus sign was found, strip the name component from
// previous up to the next minus sign.
component = referenceString.substring(lastMinusIndex + 1, minusIndex);
} else {
// If minus sign was not found, strip the name component from
// previous minus to the end of the string.
component = referenceString.substring(lastMinusIndex + 1);
}
if (widgetId == null) {
widgetId = component;
} else {
if (memberNames == null) {
memberNames = new ArrayList();
}
MemberName memberName;
try {
memberName = MemberName.getMemberNameFor(component);
} catch (IllegalArgumentException e) {
throw new XDIMEException("Undefined " + getMemberType().getName() + " reference: " + referenceString);