}
/** Converts a {@link List} of "name", "=", "value" tokens into a {@link Map}. */
protected ObjectProperties toObjectProperties(List<String> args) throws ConfigurationException
{
ObjectProperties properties = new ObjectProperties();
Iterator<String> i = args.iterator();
while (i.hasNext())
{
String key = i.next();
if (!i.hasNext())
{
throw new ConfigurationException(String.format(PROPERTY_KEY_ONLY_MSG, getLine()));
}
if (!"=".equals(i.next()))
{
throw new ConfigurationException(String.format(PROPERTY_NO_EQUALS_MSG, getLine()));
}
if (!i.hasNext())
{
throw new ConfigurationException(String.format(PROPERTY_NO_VALUE_MSG, getLine()));
}
String value = i.next();
// parse property key
ObjectProperties.Property property = ObjectProperties.Property.parse(key);
properties.put(property, value);
}
return properties;
}