{"id":23284202,"url":"https://github.com/agilecreativity/swiza-interop","last_synced_at":"2025-04-06T15:15:14.304Z","repository":{"id":62433752,"uuid":"205939907","full_name":"agilecreativity/swiza-interop","owner":"agilecreativity","description":"swiza-interop by agilecreativity","archived":false,"fork":false,"pushed_at":"2019-12-19T04:51:16.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-30T05:01:58.592Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://choomnuan.com/posts-output/2019-09-02-useful-function-for-inspect-java-methods-from-clojure/","language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agilecreativity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-02T21:34:09.000Z","updated_at":"2019-12-19T04:51:18.000Z","dependencies_parsed_at":"2022-11-01T21:16:10.007Z","dependency_job_id":null,"html_url":"https://github.com/agilecreativity/swiza-interop","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fswiza-interop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fswiza-interop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fswiza-interop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fswiza-interop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agilecreativity","download_url":"https://codeload.github.com/agilecreativity/swiza-interop/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247500476,"owners_count":20948880,"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-20T01:38:38.429Z","updated_at":"2025-04-06T15:15:14.287Z","avatar_url":"https://github.com/agilecreativity.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# swiza-interop\n\n[![Clojars Project](https://img.shields.io/clojars/v/net.b12n/swiza-interop.svg)](https://clojars.org/net.b12n/swiza-interop)\n[![Dependencies Status](https://jarkeeper.com/agilecreativity/swiza-interop/status.png)](https://jarkeeper.com/agilecreativity/swiza-interop)\n\nClojure CLI library designed to make it easier to inspect Java methods from Clojure.\n\n## Installation \n\nAdd the following to your `project.clj` or `deps.edn`\n\n```clojure\n[net.b12n/swiza-interop \"0.1.0\"]\n```\n\n## Usages/Examples\n\n- Using `print-methods` on `java.util.UUID`\n\n```clojure\n(ns your-project.core\n  (:require\n   [b12n.swiza.interop.core :refer [print-methods\n                                    jmethods\n                                    java-methods]]))\n\n(print-methods java.util.UUID)\n\n;;=\u003e\n(\"public boolean java.util.UUID.equals(java.lang.Object)\"\n \"public java.lang.String java.util.UUID.toString()\"\n \"public int java.util.UUID.hashCode()\"\n \"public int java.util.UUID.compareTo(java.util.UUID)\"\n \"public int java.util.UUID.compareTo(java.lang.Object)\"\n \"public long java.util.UUID.timestamp()\"\n \"private static java.lang.String java.util.UUID.digits(long,int)\"\n \"public int java.util.UUID.version()\"\n \"public int java.util.UUID.variant()\"\n \"public static java.util.UUID java.util.UUID.randomUUID()\"\n \"public static java.util.UUID java.util.UUID.nameUUIDFromBytes(byte[])\"\n \"public static java.util.UUID java.util.UUID.fromString(java.lang.String)\"\n \"public long java.util.UUID.getLeastSignificantBits()\"\n \"public long java.util.UUID.getMostSignificantBits()\"\n \"public int java.util.UUID.clockSequence()\"\n \"public long java.util.UUID.node()\")\n```\n\n- Using `jmethods` on `java.util.UUID`\n\n```clojure\n(jmethods java.util.UUID)\n```\n\nYou will get \n\n```clojure\n(compareTo\n version\n timestamp\n randomUUID\n nameUUIDFromBytes\n fromString\n getMostSignificantBits\n getLeastSignificantBits\n variant\n toString\n node\n equals\n hashCode\n clockSequence)\n```\n\nIf you just want to see the `getter` methods only then you could use\n\n```clojure\n(jmethods java.util.UUID {:show-getter? true})\n```\nWhich should only show you the getter methods from the given Java class.\n\n```clojure\n(getMostSignificantBits getLeastSignificantBits)\n```\n\n- Using `java-methods` on `java.util.UUID`\n\n```clojure\n(java-methods java.util.UUID)\n```\n\nWill give you something like:\n\n```clojure\n({:flags #{:public},\n  :return-type int,\n  :name clockSequence,\n  :parameter-types []}\n {:flags #{:public :bridge :synthetic},\n  :return-type int,\n  :name compareTo,\n  :parameter-types [java.lang.Object]}\n {:flags #{:public},\n  :return-type int,\n  :name compareTo,\n  :parameter-types [java.util.UUID]}\n {:flags #{:private :static},\n  :return-type java.lang.String,\n  :name digits,\n  :parameter-types [long int]}\n {:flags #{:public},\n  :return-type boolean,\n  :name equals,\n  :parameter-types [java.lang.Object]}\n {:flags #{:public :static},\n  :return-type java.util.UUID,\n  :name fromString,\n  :parameter-types [java.lang.String]}\n {:flags #{:public},\n  :return-type long,\n  :name getLeastSignificantBits,\n  :parameter-types []}\n {:flags #{:public},\n  :return-type long,\n  :name getMostSignificantBits,\n  :parameter-types []}\n {:flags #{:public},\n  :return-type int,\n  :name hashCode,\n  :parameter-types []}\n {:flags #{:public :static},\n  :return-type java.util.UUID,\n  :name nameUUIDFromBytes,\n  :parameter-types [byte\u003c\u003e]}\n {:flags #{:public},\n  :return-type long,\n  :name node,\n  :parameter-types []}\n {:flags #{:public :static},\n  :return-type java.util.UUID,\n  :name randomUUID,\n  :parameter-types []}\n {:flags #{:public},\n  :return-type long,\n  :name timestamp,\n  :parameter-types []}\n {:flags #{:public},\n  :return-type java.lang.String,\n  :name toString,\n  :parameter-types []}\n {:flags #{:public},\n  :return-type int,\n  :name variant,\n  :parameter-types []}\n {:flags #{:public},\n  :return-type int,\n  :name version,\n  :parameter-types []})\n```\n\nPersonally I use `jmethods` more often than others due to the ability to get specific value that I need via the options.\n\nHope this make your interactive development with Clojure easier and fun.\n\n### Links \n\n- [java.util.UUID][1] Java documentation\n\n[1]: https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fswiza-interop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilecreativity%2Fswiza-interop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fswiza-interop/lists"}