{"id":22288382,"url":"https://github.com/unclebob/javaargs","last_synced_at":"2025-07-25T04:39:53.908Z","repository":{"id":471945,"uuid":"96966","full_name":"unclebob/javaargs","owner":"unclebob","description":"The Java version of the Args Program.","archived":false,"fork":false,"pushed_at":"2020-01-21T17:14:52.000Z","size":130,"stargazers_count":51,"open_issues_count":1,"forks_count":52,"subscribers_count":9,"default_branch":"master","last_synced_at":"2023-04-12T14:17:33.867Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://butunclebob.com/ArticleS.UncleBob.CleanCodeArgs","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unclebob.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-12-26T17:29:38.000Z","updated_at":"2023-04-02T03:33:16.000Z","dependencies_parsed_at":"2022-07-16T14:47:22.248Z","dependency_job_id":null,"html_url":"https://github.com/unclebob/javaargs","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclebob%2Fjavaargs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclebob%2Fjavaargs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclebob%2Fjavaargs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclebob%2Fjavaargs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unclebob","download_url":"https://codeload.github.com/unclebob/javaargs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227961828,"owners_count":17847841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-03T17:04:33.702Z","updated_at":"2024-12-03T17:04:34.322Z","avatar_url":"https://github.com/unclebob.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"This is the java version of the Args program described in: http://butunclebob.com/ArticleS.UncleBob.CleanCodeArgs\n\npublic class ArgsMain {\n  public static void main(String[] args) {\n    try {\n      Args arg = new Args(\"l,p#,d*\", args);\n      boolean logging = arg.getBoolean('l');\n      int port = arg.getInt('p');\n      String directory = arg.getString('d');\n      executeApplication(logging, port, directory);\n    } catch (ArgsException e) {\n      System.out.printf(\"Argument error: %s\\n\", e.errorMessage());\n    }\n  }\n\n  private static void executeApplication(boolean logging, int port, String directory) {\n    System.out.printf(\"logging is %s, port:%d, directory:%s\\n\",logging, port, directory);\n  }\n}\n\nSchema:\n - char    - Boolean arg.\n - char*   - String arg.\n - char#   - Integer arg.\n - char##  - double arg.\n - char[*] - one element of a string array.\n\nExample schema: (f,s*,n#,a##,p[*])\nCoresponding command line: \"-f -s Bob -n 1 -a 3.2 -p e1 -p e2 -p e3\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclebob%2Fjavaargs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funclebob%2Fjavaargs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclebob%2Fjavaargs/lists"}