{"id":36427381,"url":"https://github.com/jay-g-mehta/reflectioninvoker","last_synced_at":"2026-01-11T18:04:09.090Z","repository":{"id":49973215,"uuid":"325909266","full_name":"jay-g-mehta/reflectioninvoker","owner":"jay-g-mehta","description":"Simple, Easy, Powerful Java Reflection utility for invoking methods.","archived":false,"fork":false,"pushed_at":"2021-06-07T09:59:38.000Z","size":52,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-26T22:16:59.650Z","etag":null,"topics":["java","java-reflection-utility","reflection","reflection-executor","reflection-invoker","reflection-library","reflection-utility"],"latest_commit_sha":null,"homepage":"https://jay-g-mehta.github.io/reflectioninvoker/","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/jay-g-mehta.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-01-01T03:14:41.000Z","updated_at":"2021-01-24T23:21:55.000Z","dependencies_parsed_at":"2022-09-21T15:51:30.180Z","dependency_job_id":null,"html_url":"https://github.com/jay-g-mehta/reflectioninvoker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jay-g-mehta/reflectioninvoker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay-g-mehta%2Freflectioninvoker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay-g-mehta%2Freflectioninvoker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay-g-mehta%2Freflectioninvoker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay-g-mehta%2Freflectioninvoker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jay-g-mehta","download_url":"https://codeload.github.com/jay-g-mehta/reflectioninvoker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jay-g-mehta%2Freflectioninvoker/sbom","scorecard":{"id":508711,"data":{"date":"2025-08-11","repo":{"name":"github.com/jay-g-mehta/reflectioninvoker","commit":"091c5e4c45d27823fdcdf0bf9cd9e3c52995773e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"64 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-h46c-h94j-95f3","Warn: Project is vulnerable to: GHSA-wf8f-6423-gfxg","Warn: Project is vulnerable to: GHSA-27xj-rqx5-2255","Warn: Project is vulnerable to: GHSA-288c-cq4h-88gq","Warn: Project is vulnerable to: GHSA-4gq5-ch57-c2mg","Warn: Project is vulnerable to: GHSA-4w82-r329-3q67","Warn: Project is vulnerable to: GHSA-57j2-w4cx-62h2","Warn: Project is vulnerable to: GHSA-58pp-9c76-5625","Warn: Project is vulnerable to: GHSA-5949-rw7g-wx7w","Warn: Project is vulnerable to: GHSA-5p34-5m6p-p58g","Warn: Project is vulnerable to: GHSA-5r5r-6hpj-8gg9","Warn: Project is vulnerable to: GHSA-5ww9-j83m-q7qx","Warn: Project is vulnerable to: GHSA-645p-88qh-w398","Warn: Project is vulnerable to: GHSA-6fpp-rgj9-8rwc","Warn: Project is vulnerable to: GHSA-758m-v56v-grj4","Warn: Project is vulnerable to: GHSA-85cw-hj65-qqv9","Warn: Project is vulnerable to: GHSA-89qr-369f-5m5x","Warn: Project is vulnerable to: GHSA-8c4j-34r4-xr8g","Warn: Project is vulnerable to: GHSA-8w26-6f25-cm9x","Warn: Project is vulnerable to: GHSA-95cm-88f5-f2c7","Warn: Project is vulnerable to: GHSA-9gph-22xh-8x98","Warn: Project is vulnerable to: GHSA-9m6f-7xcq-8vf8","Warn: Project is vulnerable to: GHSA-9mxf-g3x6-wv74","Warn: Project is vulnerable to: GHSA-9vvp-fxw6-jcxr","Warn: Project is vulnerable to: GHSA-c265-37vj-cwcc","Warn: Project is vulnerable to: GHSA-c2q3-4qrh-fm48","Warn: Project is vulnerable to: GHSA-c8hm-7hpq-7jhg","Warn: Project is vulnerable to: GHSA-cf6r-3wgc-h863","Warn: Project is vulnerable to: GHSA-cmfg-87vq-g5g4","Warn: Project is vulnerable to: GHSA-cvm9-fjm9-3572","Warn: Project is vulnerable to: GHSA-f3j5-rmmp-3fc5","Warn: Project is vulnerable to: GHSA-f9hv-mg5h-xcw9","Warn: Project is vulnerable to: GHSA-f9xh-2qgp-cq57","Warn: Project is vulnerable to: GHSA-fmmc-742q-jg75","Warn: Project is vulnerable to: GHSA-fqwf-pjwf-7vqv","Warn: Project is vulnerable to: GHSA-gjmw-vf9h-g25v","Warn: Project is vulnerable to: GHSA-gwp4-hfv6-p7hw","Warn: Project is vulnerable to: GHSA-gww7-p5w4-wrfv","Warn: Project is vulnerable to: GHSA-h3cw-g4mq-c5x2","Warn: Project is vulnerable to: GHSA-h4rc-386g-6m85","Warn: Project is vulnerable to: GHSA-h822-r4r5-v8jg","Warn: Project is vulnerable to: GHSA-j823-4qch-3rgm","Warn: Project is vulnerable to: GHSA-jjjh-jjxp-wpff","Warn: Project is vulnerable to: GHSA-m6x4-97wx-4q27","Warn: Project is vulnerable to: GHSA-mc6h-4qgp-37qh","Warn: Project is vulnerable to: GHSA-mph4-vhrx-mv67","Warn: Project is vulnerable to: GHSA-mx7p-6679-8g3q","Warn: Project is vulnerable to: GHSA-mx9v-gmh4-mgqw","Warn: Project is vulnerable to: GHSA-p43x-xfjf-5jhr","Warn: Project is vulnerable to: GHSA-q93h-jc49-78gg","Warn: Project is vulnerable to: GHSA-qjw2-hr98-qgfh","Warn: Project is vulnerable to: GHSA-qmqc-x3r4-6v39","Warn: Project is vulnerable to: GHSA-r3gr-cxrf-hg25","Warn: Project is vulnerable to: GHSA-r695-7vr9-jgc2","Warn: Project is vulnerable to: GHSA-rf6r-2c4q-2vwg","Warn: Project is vulnerable to: GHSA-rgv9-q543-rqg4","Warn: Project is vulnerable to: GHSA-rpr3-cw39-3pxh","Warn: Project is vulnerable to: GHSA-v3xw-c963-f5hc","Warn: Project is vulnerable to: GHSA-v585-23hc-c647","Warn: Project is vulnerable to: GHSA-vfqx-33qm-g869","Warn: Project is vulnerable to: GHSA-wh8g-3j2c-rqj5","Warn: Project is vulnerable to: GHSA-x2w5-5m2g-7h5m","Warn: Project is vulnerable to: GHSA-78wr-2p64-hpwj","Warn: Project is vulnerable to: GHSA-gwrp-pvrq-jmwv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T23:56:20.461Z","repository_id":49973215,"created_at":"2025-08-19T23:56:20.461Z","updated_at":"2025-08-19T23:56:20.461Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28317273,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["java","java-reflection-utility","reflection","reflection-executor","reflection-invoker","reflection-library","reflection-utility"],"created_at":"2026-01-11T18:04:08.514Z","updated_at":"2026-01-11T18:04:09.085Z","avatar_url":"https://github.com/jay-g-mehta.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RI: Reflection Invoker\n\n![image](https://user-images.githubusercontent.com/19273732/104975331-46636500-59af-11eb-935d-cbeb7852ed3c.png)\n\nSimple, Easy \u0026 Powerful Java Reflection utility for invoking methods.\n\nInvoke Java static methods, class methods and constructors using Java reflection at runtime using one schema.\n\nRI lifts heavy redundant Java Reflection generic code, data type translation, primitive data type handling, wraps \nexceptions, exposes builder and utilities to statically and/or dynamically define targets to be invoked.\n\nReflection Invoker provides framework for extending method invoking from user configuration. Built-in support for JSON\nschema and reader. Provision for user to extend schema in JSON, YAML or other configuration language and implement its\n reader.\n\n## How to use \n### Add to Maven project dependency\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.jay-g-mehta\u003c/groupId\u003e\n    \u003cartifactId\u003ereflectioninvoker\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\n### How to invoke static method using Java Reflection Invoker\n\n```java\n// i. Define what is to be invoked\nTarget target = new Target();\ntarget.setClazz(\"org.apache.commons.lang3.ArrayUtils\");\ntarget.setMethod(\"contains\");\ntarget.setMethodArgs(ImmutableList.of(ImmutableList.of(\"Mumbai\", \"Paris\", \"Tokyo\"), \"Helsinki\"));\ntarget.setMethodArgsType(ImmutableList.of(\"[Ljava.lang.Object;\", \"java.lang.Object\"));\n\n// ii. Invoke \u0026 get results\nReflectionInvoker invoker = new Invoker();\nBoolean actual = (Boolean) invoker.invoke(target);\n```\n### How to invoke a constructor using Java Reflection Invoker\n\nBelow example shows how to constructor Date object by calling constructor using Java Reflection Invoker\n\n```java\nTarget target = new Target();\ntarget.setClazz(\"java.util.Date\");\ntarget.setMethod(\"Date\");\ntarget.setMethodArgs(ImmutableList.of(1610996650749L));\ntarget.setMethodArgsType(ImmutableList.of(\"long\"));\n\nReflectionInvoker invoker = new Invoker();\nDate date = (Date) invoker.invoke(target);\n```\n\n### How to invoke class method using Java Reflection Invoker\n\n```java\nTarget target = new Target();\ntarget.setClazz(\"java.util.Date\");\ntarget.setMethod(\"toString\");\ntarget.setMethodArgs(ImmutableList.of());\ntarget.setMethodArgsType(ImmutableList.of());\ntarget.setClazzInstance(date);\n\nReflectionInvoker invoker = new Invoker();\nString dateToString = (String) invoker.invoke(target);\n```\n\nClass instance can be passed as Target type as well. RI will take care of creating class instance before invoking\nmethod\n\n```java\nTarget dateInstance = new Target();\ndateInstance.setClazz(\"java.util.Date\");\ndateInstance.setMethod(\"Date\");\ndateInstance.setMethodArgs(ImmutableList.of(1610996650749L));\ndateInstance.setMethodArgsType(ImmutableList.of(\"long\"));\n\nTarget target = new Target();\ntarget.setClazz(\"java.util.Date\");\ntarget.setMethod(\"toString\");\ntarget.setMethodArgs(ImmutableList.of());\ntarget.setMethodArgsType(ImmutableList.of());\ntarget.setClazzInstance(dateInstance);\n\nReflectionInvoker invoker = new Invoker();\nString dateToString = invoker.invoke(target);\n```\n\n\n### Chaining Executor: How to invoke multiple methods using Java Reflection Invoker\n\n```java\n\n// i. Define first target what is to be invoked\nTarget targetInstance = new Target();\ntargetInstance.setClazz(\"org.apache.commons.lang3.ArrayUtils\");\ntargetInstance.setMethod(\"contains\");\ntargetInstance.setMethodArgs(ImmutableList.of(ImmutableList.of(\"Mumbai\", \"Paris\", \"Tokyo\"), \"Helsinki\"));\ntargetInstance.setMethodArgsType(ImmutableList.of(\"[Ljava.lang.Object;\", \"java.lang.Object\"));\n\n// ii. Define more targets what is to be invoked\nTarget targetInstance2 = new Target();\ntargetInstance2.setClazz(\"org.apache.commons.collections4.CollectionUtils\");\ntargetInstance2.setMethod(\"containsAny\");\ntargetInstance2.setMethodArgs(ImmutableList.of(ImmutableList.of(\"Tesla\", \"Einstein\", \"Homi Bhabha\"),\n        ImmutableList.of(\"Messi\")));\ntargetInstance2.setMethodArgsType(ImmutableList.of(\"java.util.Collection\", \"java.util.Collection\"));\n\n// iii. Chain targets\nTargetsProvider targetsProvider = BuildTargetsProvider.builder()\n        .target(targetInstance)\n        .target(targetInstance2)\n        .build();\n\n// iv. Define Chain executor\nReflectionInvoker invoker = new Invoker();\nSerialSynchronousReflectionInvokerExecutor serialSynchronousReflectionInvokerExecutor =\n        new SerialSynchronousReflectionInvokerExecutor(invoker);\n\n// v. Invoke \u0026 get result\nList\u003cObject\u003e actual = serialSynchronousReflectionInvokerExecutor.execute(targetsProvider);\n```\n\n### How to invoke methods using Java Reflection Invoker represented by JSON configuration\n\nDefine methods to invoke by reflection via built-in JSON configuration schema:\n```json\n[{\n  \"clazz\": \"org.apache.commons.lang3.ArrayUtils\",\n  \"method\": \"contains\",\n  \"methodArgs\": [\n    [\"Mumbai\", \"Paris\", \"Tokyo\"], \"Helsinki\"\n  ],\n  \"methodArgsType\": [\"[Ljava.lang.Object;\", \"java.lang.Object\"]\n}]\n```\nInvoke all methods defined in JSON configuration using generic code:\n```java\n// i. Define reader above json config\nTargetsConfigReader reader = new FileSystemConfigReader(\"UTF-8\", \"/path/to/config.json\");\n// ii. Define translator to deserialize config to Target object\nTargetsConfigTranslator translator = new TargetsJsonTranslator(new ObjectMapper());\n// iii. Define and build config targets provider\nConfigTargetsProvider configTargetsProvider = new ConfigTargetsProvider(reader, translator);\nconfigTargetsProvider.build();\n// iv. Define Chain executor\nReflectionInvoker invoker = new Invoker();\nSerialSynchronousReflectionInvokerExecutor serialSynchronousReflectionInvokerExecutor =\n        new SerialSynchronousReflectionInvokerExecutor(invoker);\n// v. Invoke \u0026 get result\nList\u003cObject\u003e actual = serialSynchronousReflectionInvokerExecutor.execute(configTargetsProvider);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay-g-mehta%2Freflectioninvoker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjay-g-mehta%2Freflectioninvoker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjay-g-mehta%2Freflectioninvoker/lists"}