Examine the name and extract the name of the value, which could be either
a plain name or a prefixed name.
final List parts = mDottedName.getParts();
final int numParts = parts.size();
// the scope is first, then
// there must be at least 1 part for there to be a value
// example: "domain.locale"
if ( numParts == 0 )
{
final String msg = DottedNameStrings.getString(
DottedNameStrings.NO_VALUE_NAME_SPECIFIED_KEY );
throw new IllegalArgumentException( msg + " = " + mDottedName );
}
// the last part is the value name
final String lastPart = (String)parts.get( numParts - 1 );
int numPrefixParts = 0;
// If the part preceeding the value name is prefix
// then
PrefixedValueSupport prop_support = new PrefixedValueSupport(null);
final String dottedName = DottedName.toString(mDottedName.getDomain(),
mDottedName.getScope(),
mDottedName.getParts(), false);
final boolean isPrefixed = prop_support.isPrefixedValueDottedName(dottedName);
if ( isPrefixed )
{
mValueName = prop_support.getPrefixedValueName(dottedName, true);
numPrefixParts = numParts - 2;
}
else
{
// it's a regular value name; does not include prefix
mValueName = lastPart;
numPrefixParts = numParts - 1;
}
return( DottedNameFactory.getInstance().get( DottedName.toString( mDottedName, numPrefixParts ) ) );