public static void addOptionsTo(final Properties target, final String[] options,
            final Properties config)
    {
        for (String o : options)
        {
            int idx = o.indexOf(':');
            if (idx != -1)
            {
                target.setProperty(o.substring(0, idx).trim(), o.substring(idx + 1).trim());
                continue;
            }

            String key = o.trim();
            switch (key.charAt(0))
            {
                case '!':
                    // remove key
                    target.remove(key.substring(1));
                    break;

                case '_':
                    // could be a reference to a csv entry in config
                    if (config != null)
                    {
                        String csv = config.getProperty(key);
                        if (csv != null)
                        {
                            // include the csv from config props
                            addOptionsTo(target, COMMA.split(csv), config);
                        }
                    }

                default:
                    target.setProperty(key, "");
            }
        }
    }
The main execution point of compiling protos.

@author David Yu
@created Jan 5, 2010
protostuff-compiler/src/main/java/io/protostuff/compiler/CompilerMain.java