test_class.file: blobit-cli/src/test/java/org/blobit/cli/MainTest.java
test_class.identifier: MainTest
test_case.body: @Test
      public void testSetZk() throws Exception {
          CommandCreateBucket cl = Main.parseCommandLine(new String[]{"createbucket", "--bucket", "foo",
              "--zk", "localhost:1234"});
          System.out.println("res:" + cl);
          assertEquals("foo", cl.bucket);
          assertEquals("localhost:1234", cl.zk);
      }
test_case.class_method_signature: MainTest.testSetZk()
test_case.full_signature: @Test public void testSetZk()
test_case.identifier: testSetZk
test_case.invocations: parseCommandLine println assertEquals assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetZk()
focal_class.file: blobit-cli/src/main/java/org/blobit/cli/Main.java
focal_class.identifier: Main
focal_class.class_method_signature: Main.main(String... args)
focal_class.full_signature: public static void main(String... args)
focal_class.identifier: main
focal_class.modifiers: public static
focal_class.parameters: (String... args)
focal_class.return: void
focal_class.signature: void main(String... args)
focal_class.class_method_signature: Main.parseCommandLine(String[] args)
focal_class.full_signature: public static T parseCommandLine(String[] args)
focal_class.identifier: parseCommandLine
focal_class.modifiers: public static
focal_class.parameters: (String[] args)
focal_class.return: T
focal_class.signature: T parseCommandLine(String[] args)
focal_method.body: public static <T extends AbstractCommand> T parseCommandLine(String[] args) throws Exception {
          CommandContext cm = new CommandContext();
          JCommander jc = JCommander.newBuilder()
                  .programName("blobit.sh")
                  .addObject(cm)
                  .addCommand("createbucket", new CommandCreateBucket(cm))
                  .addCommand("deletebucket", new CommandDeleteBucket(cm))
                  .addCommand("gcbucket", new CommandGcBucket(cm))
                  .addCommand("listbuckets", new CommandListBuckets(cm))
                  .addCommand("put", new CommandPut(cm))
                  .addCommand("get", new CommandGet(cm))
                  .addCommand("stat", new CommandStat(cm))
                  .addCommand("ls", new CommandLs(cm))
                  .addCommand("help", new CommandHelp(cm))
                  .build();
          cm.jCommander = jc;
          try {
              jc.parse(args);
          } catch (ParameterException err) {
              System.out.println("Error: " + err.getMessage());
              return (T) new CommandHelp(cm);
          }
          if (jc.getParsedCommand() == null) {
              return (T) new CommandHelp(cm);
          }
          return (T) jc.getCommands().get(jc.getParsedCommand()).getObjects().get(0);
      }
focal_method.class_method_signature: Main.parseCommandLine(String[] args)
focal_method.full_signature: public static T parseCommandLine(String[] args)
focal_method.identifier: parseCommandLine
focal_method.invocations: build addCommand addCommand addCommand addCommand addCommand addCommand addCommand addCommand addCommand addObject programName newBuilder parse println getMessage getParsedCommand get getObjects get getCommands getParsedCommand
focal_method.modifiers: public static
focal_method.parameters: (String[] args)
focal_method.return: T
focal_method.signature: T parseCommandLine(String[] args)