refactoring: move the code parsing and validating command line arguments into a separate method, so that the main becomes shorter. Also move most of the code in main to an instance method.

RELNOTES: n/a

--
PiperOrigin-RevId: 151155142
MOS_MIGRATED_REVID=151155142

GitOrigin-RevId: cd20fb98149d198bea492d2052c177fc6554a415
Change-Id: Id040879ce6feaffb66ca5c92c600ef87c68527b2
1 file changed
tree: c3a8f1a66e15245f37f6da48ab3e4430fb0c0d33
  1. java/