if (entries.size() > 0) {
OptionMap.Builder builder = OptionMap.builder();
final ClassLoader loader = SecurityActions.getClassLoader(this.getClass());
for (ResourceEntry entry : entries) {
final Option option = Option.fromString(entry.getName(), loader);
builder.set(option, option.parseValue(entry.getModel().get(CommonAttributes.VALUE).asString(), loader));
}
optionMap = builder.getMap();
} else {
optionMap = OptionMap.EMPTY;
}