{"id":15524130,"url":"https://github.com/taketoday/today-method-invoker","last_synced_at":"2025-06-11T12:33:05.277Z","repository":{"id":97726375,"uuid":"216062004","full_name":"TAKETODAY/today-method-invoker","owner":"TAKETODAY","description":":green_apple: Java Byte Code Method Invoker","archived":false,"fork":false,"pushed_at":"2021-01-03T13:40:33.000Z","size":121,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-25T00:42:37.355Z","etag":null,"topics":["bytecode","invoke","invoker","java","java-byte-code","method"],"latest_commit_sha":null,"homepage":"https://taketoday.cn","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TAKETODAY.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-18T16:10:36.000Z","updated_at":"2023-03-05T08:49:13.000Z","dependencies_parsed_at":"2023-12-20T16:22:12.074Z","dependency_job_id":null,"html_url":"https://github.com/TAKETODAY/today-method-invoker","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/TAKETODAY%2Ftoday-method-invoker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TAKETODAY%2Ftoday-method-invoker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TAKETODAY%2Ftoday-method-invoker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TAKETODAY%2Ftoday-method-invoker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TAKETODAY","download_url":"https://codeload.github.com/TAKETODAY/today-method-invoker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248333605,"owners_count":21086199,"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":["bytecode","invoke","invoker","java","java-byte-code","method"],"created_at":"2024-10-02T10:49:15.390Z","updated_at":"2025-04-11T03:02:14.634Z","avatar_url":"https://github.com/TAKETODAY.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Byte Code Method Invoker\r\n\r\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/27df9e2cafa247acb9cae634a17b6044)](https://www.codacy.com/manual/TAKETODAY/today-method-invoker?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=TAKETODAY/today-method-invoker\u0026amp;utm_campaign=Badge_Grade)\r\n![Java CI](https://github.com/TAKETODAY/today-method-invoker/workflows/Java%20CI/badge.svg)\r\n\r\n## :memo: 使用说明\r\n\r\n```java\r\npublic class TestHandlerInvoker {\r\n\r\n\tpublic static void main(String[] args) throws Exception {\r\n\r\n        System.setProperty(\"cglib.debugLocation\", \"D:/debug\");\r\n        {\r\n            final Method main = Bean.class.getDeclaredMethod(\"main\");\r\n            final Invoker mainInvoker = MethodInvokerCreator.create(main);\r\n            mainInvoker.invoke(null, null);\r\n        }\r\n        {\r\n            final Method test = Bean.class.getDeclaredMethod(\"test\", short.class);\r\n            final Invoker mainInvoker = MethodInvokerCreator.create(test);\r\n            mainInvoker.invoke(null, new Object[] { (short) 1 });\r\n        }\r\n\r\n        final Invoker create = MethodInvokerCreator.create(Bean.class, \"test\");\r\n        create.invoke(new Bean(), null);\r\n        final Invoker itself = MethodInvokerCreator.create(Bean.class, \"test\", Bean.class);\r\n        itself.invoke(new Bean(), new Object[] { new Bean() });\r\n    }\r\n\r\n    public static class Bean {\r\n\r\n        public static void test(short i) throws Throwable {\r\n            System.err.println(\"static main \" + i);\r\n        }\r\n\r\n        protected static void main() throws Throwable {\r\n            System.err.println(\"static main\");\r\n        }\r\n\r\n        public void test() throws Throwable {\r\n            System.err.println(\"instance test\");\r\n        }\r\n\r\n        void test(Bean itself) {\r\n            System.err.println(\"instance test :\" + itself);\r\n        }\r\n    }\r\n}\r\n\r\n```\r\n\r\n## 🙏 鸣谢\r\n\r\n本项目的诞生离不开以下项目：\r\n\r\n* [ASM](https://asm.ow2.io): ASM is an all purpose Java bytecode manipulation and analysis framework\r\n* [Cglib](https://github.com/cglib/cglib): Byte Code Generation Library\r\n\r\n## 📄 开源协议\r\n\r\n使用 [GNU GENERAL PUBLIC LICENSE](https://github.com/TAKETODAY/today-method-invoker/blob/master/LICENSE) 开源协议\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaketoday%2Ftoday-method-invoker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftaketoday%2Ftoday-method-invoker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftaketoday%2Ftoday-method-invoker/lists"}