TOOLS: Refactor the BuildMetadataProtoFromXml tool to:
authorroubert@google.com <roubert@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Tue, 3 Jul 2012 16:31:34 +0000 (16:31 +0000)
committerroubert@google.com <roubert@google.com@ee073f10-1060-11df-b6a4-87a95322a99c>
Tue, 3 Jul 2012 16:31:34 +0000 (16:31 +0000)
commit7a32426041567e06db6a575f2ef6a0bedcb6b65e
tree395df51ea65a0d9a10ce75700ea056e32b1b90b3
parentaa5a5e2d6167f5a23a43bb2c8bb1000c897d5ba6
TOOLS: Refactor the BuildMetadataProtoFromXml tool to:

- Make command line parameters named instead of positional.

- Move all information about paths, names, etc., from being hardcoded into the
  tool itself to command line parameters, so that new files in the future can
  be generated by just adding build rules for them without having to update the
  tool.

- Not hard-code class or package names, but get them from the Class object.

- Break code generation up into smaller parts, to make it easier to extend the
  code generation and share code while generating different classes.

- Update BuildMetadataFromXml to not output empty region codes.

- Generate either a Map or a Set, depending on whether the mapping table
  actually contains any data or not.

All files generated by the tool remain identical to before this change.
Review URL: https://codereview.appspot.com/6343066

git-svn-id: http://libphonenumber.googlecode.com/svn/trunk@484 ee073f10-1060-11df-b6a4-87a95322a99c
tools/java/common/src/com/google/i18n/phonenumbers/BuildMetadataFromXml.java
tools/java/java-build/src/com/google/i18n/phonenumbers/BuildMetadataProtoFromXml.java