{"id":13485879,"url":"https://github.com/ronmamo/reflections","last_synced_at":"2025-12-16T21:04:09.747Z","repository":{"id":8064839,"uuid":"9476938","full_name":"ronmamo/reflections","owner":"ronmamo","description":"Java runtime metadata analysis","archived":false,"fork":false,"pushed_at":"2024-06-17T21:43:09.000Z","size":1064,"stargazers_count":4777,"open_issues_count":122,"forks_count":710,"subscribers_count":192,"default_branch":"master","last_synced_at":"2025-12-07T16:46:38.641Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"wtfpl","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ronmamo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING.txt","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},"funding":{"github":null,"patreon":"ronma","open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WLN75KYSR6HAY"}},"created_at":"2013-04-16T16:19:26.000Z","updated_at":"2025-12-04T01:18:20.000Z","dependencies_parsed_at":"2023-01-13T14:37:23.932Z","dependency_job_id":"d6ebdfc6-17b2-40ef-93a2-5734ef1b6edd","html_url":"https://github.com/ronmamo/reflections","commit_stats":{"total_commits":121,"total_committers":36,"mean_commits":3.361111111111111,"dds":"0.47107438016528924","last_synced_commit":"f5514b125c4f4b58e92beb0979a40ddce48d5be1"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/ronmamo/reflections","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronmamo%2Freflections","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronmamo%2Freflections/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronmamo%2Freflections/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronmamo%2Freflections/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ronmamo","download_url":"https://codeload.github.com/ronmamo/reflections/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ronmamo%2Freflections/sbom","scorecard":{"id":784373,"data":{"date":"2025-08-11","repo":{"name":"github.com/ronmamo/reflections","commit":"f5514b125c4f4b58e92beb0979a40ddce48d5be1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.2,"checks":[{"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":"Code-Review","score":1,"reason":"Found 4/23 approved changesets -- score normalized to 1","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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/maven-ci.yml:1","Info: no jobLevel write permissions found"],"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/ronmamo/reflections/maven-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/ronmamo/reflections/maven-ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/maven-ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/ronmamo/reflections/maven-ci.yml/master?enable=pin","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned"],"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":"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":10,"reason":"project is fuzzed","details":["Info: OSSFuzz integration 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: COPYING.txt:0","Info: FSF or OSI recognized license: Do What The F*ck You Want To Public License: COPYING.txt: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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact 0.10.2 not signed: https://api.github.com/repos/ronmamo/reflections/releases/51982712","Warn: release artifact 0.10.1 not signed: https://api.github.com/repos/ronmamo/reflections/releases/50951546","Warn: release artifact 0.10 not signed: https://api.github.com/repos/ronmamo/reflections/releases/50747560","Warn: release artifact 0.10.2 does not have provenance: https://api.github.com/repos/ronmamo/reflections/releases/51982712","Warn: release artifact 0.10.1 does not have provenance: https://api.github.com/repos/ronmamo/reflections/releases/50951546","Warn: release artifact 0.10 does not have provenance: https://api.github.com/repos/ronmamo/reflections/releases/50747560"],"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":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-23T05:41:54.280Z","repository_id":8064839,"created_at":"2025-08-23T05:41:54.280Z","updated_at":"2025-08-23T05:41:54.280Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27768429,"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","status":"online","status_checked_at":"2025-12-16T02:00:10.477Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-07-31T18:00:33.293Z","updated_at":"2025-12-16T21:04:09.731Z","avatar_url":"https://github.com/ronmamo.png","language":"Java","readme":"*❗ Please note: Reflections library is currently NOT under active development or maintenance ❗*\n\n*Thank you for your continuous support!\n\u003cbr\u003eThere are open issues and also workarounds. Release version will be considered incase contributing PR fixing the main issues.*\n\n*Last released `org.reflections:reflections:0.10.2` (Oct 2021)*\n\n----\n\n# Java runtime metadata analysis\n\n[![Build Status](https://travis-ci.org/ronmamo/reflections.svg?branch=master)](https://travis-ci.org/ronmamo/reflections)\n\nReflections scans and indexes your project's classpath metadata, allowing reverse transitive query of the type system on runtime.\n\nUsing Reflections you can query for example:\n  * Subtypes of a type\n  * Types annotated with an annotation\n  * Methods with annotation, parameters, return type\n  * Resources found in classpath  \nAnd more...\n\n*Reflections was written in the spirit of [Scannotations](http://bill.burkecentral.com/2008/01/14/scanning-java-annotations-at-runtime/) library*\n\n## Usage\nAdd Reflections dependency to your project:\n```xml\n# Maven\n\u003cdependency\u003e\n    \u003cgroupId\u003eorg.reflections\u003c/groupId\u003e\n    \u003cartifactId\u003ereflections\u003c/artifactId\u003e\n    \u003cversion\u003e0.10.2\u003c/version\u003e\n\u003c/dependency\u003e\n\n# Gradle\nimplementation 'org.reflections:reflections:0.10.2'\n```\n\nCreate Reflections instance and use the query functions: \n```java\nReflections reflections = new Reflections(\"com.my.project\");\n\nSet\u003cClass\u003c?\u003e\u003e subTypes =\n  reflections.get(SubTypes.of(SomeType.class).asClass());\n\nSet\u003cClass\u003c?\u003e\u003e annotated = \n  reflections.get(SubTypes.of(TypesAnnotated.with(SomeAnnotation.class)).asClass());\n```\n\nOr using previous 0.9.x APIs, for example:\n\n```java\nSet\u003cClass\u003c? extends SomeType\u003e\u003e subTypes =\n  reflections.getSubTypesOf(SomeType.class);\n\nSet\u003cClass\u003c?\u003e\u003e annotated = \n  reflections.getTypesAnnotatedWith(SomeAnnotation.class);\n```\n\n*Note that there are some breaking changes with Reflections 0.10+, along with performance improvements and more functional API, see below.*\n\n### Scan\nCreating Reflections instance requires [ConfigurationBuilder](https://ronmamo.github.io/reflections/org/reflections/util/ConfigurationBuilder.html), typically configured with packages and [Scanners](https://ronmamo.github.io/reflections/org/reflections/scanners/Scanners.html) to use: \n\n```java\n// typical usage: scan package with the default scanners SubTypes, TypesAnnotated\nReflections reflections = new Reflections(\n  new ConfigurationBuilder()\n    .forPackage(\"com.my.project\")\n    .filterInputsBy(new FilterBuilder().includePackage(\"com.my.project\")));\n```\n\nOther examples:\n```java\nimport static org.reflections.scanners.Scanners.*;\n\n// scan package with specific scanners\nReflections reflections = new Reflections(\n  new ConfigurationBuilder()\n    .forPackage(\"com.my.project\")\n    .filterInputsBy(new FilterBuilder().includePackage(\"com.my.project\").excludePackage(\"com.my.project.exclude\"))\n    .setScanners(TypesAnnotated, MethodsAnnotated, MethodsReturn));\n```\n\nNote that:\n* **Scanner must be configured in order to be queried, otherwise an empty result is returned**  \nIf not specified, default scanners will be used SubTypes, TypesAnnotated.  \nFor all standard scanners use `Scanners.values()`. See more scanners in the source [package](https://ronmamo.github.io/reflections/org/reflections/scanners).\n* **All relevant URLs should be configured**   \nConsider `.filterInputsBy()` in case too many classes are scanned.  \nIf required, Reflections will [expand super types](https://ronmamo.github.io/reflections/org/reflections/Reflections.html#expandSuperTypes(java.util.Map)) in order to get the transitive closure metadata without scanning large 3rd party urls.  \n* Classloader can optionally be used for resolving runtime classes from names.\n\n### Query\nOnce Reflections was instantiated and scanning was successful, it can be used for querying the indexed metadata.  \n\n```java\nimport static org.reflections.scanners.Scanners.*;\n\n// SubTypes\nSet\u003cClass\u003c?\u003e\u003e modules = \n  reflections.get(SubTypes.of(Module.class).asClass());\n\n// TypesAnnotated (*1)\nSet\u003cClass\u003c?\u003e\u003e singletons = \n  reflections.get(TypesAnnotated.with(Singleton.class).asClass());\n\n// MethodsAnnotated\nSet\u003cMethod\u003e resources =\n  reflections.get(MethodsAnnotated.with(GetMapping.class).as(Method.class));\n\n// FieldsAnnotated\nSet\u003cField\u003e ids = \n  reflections.get(FieldsAnnotated.with(Id.class).as(Field.class));\n\n// Resources\nSet\u003cString\u003e properties = \n  reflections.get(Resources.with(\".*\\\\.properties\"));\n```\n\nMore scanners:\n\n```java\n// MethodsReturn\nSet\u003cMethod\u003e voidMethods = \n  reflections.get(MethodsReturn.with(void.class).as(Method.class));\n\n// MethodsSignature\nSet\u003cMethod\u003e someMethods = \n  reflections.get(MethodsSignature.of(long.class, int.class).as(Method.class));\n\n// MethodsParameter\nSet\u003cMethod\u003e pathParam = \n  reflections.get(MethodsParameter.of(PathParam.class).as(Method.class));\n\n// ConstructorsAnnotated\nSet\u003cConstructor\u003e injectables =\n  reflections.get(ConstructorsAnnotated.with(Inject.class).as(Constructor.class));\n\n// ConstructorsSignature\nSet\u003cConstructor\u003e someConstructors = \n  reflections.get(ConstructorsSignature.of(String.class).as(Constructor.class));\n\n// MethodParameterNamesScanner\nList\u003cString\u003e parameterNames =\n  reflections.getMemberParameterNames(member);\n\n// MemberUsageScanner\nSet\u003cMember\u003e usages =\n  reflections.getMemberUsages(member)\n```\n\n*See more examples in [ReflectionsQueryTest](src/test/java/org/reflections/ReflectionsQueryTest.java).*\n\n*Note that previous 0.9.x APIs are still supported*\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003ci\u003eCompare Scanners and previous 0.9.x API (*)\u003c/i\u003e\u003c/summary\u003e\n\n| Scanners | previous 0.9.x API | previous Scanner |\n| -------- | ------------------ | ------ |\n| `get(SubType.of(T))` | getSubTypesOf(T) | ~~SubTypesScanner~~ |\n| `get(SubTypes.of(`\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;`TypesAnnotated.with(A)))` | getTypesAnnotatedWith(A) *(1)*| ~~TypeAnnotationsScanner~~ | \n| `get(MethodsAnnotated.with(A))` | getMethodsAnnotatedWith(A) | ~~MethodAnnotationsScanner~~ | \n| `get(ConstructorsAnnotated.with(A))` | getConstructorsAnnotatedWith(A) *(2)*| ~~MethodAnnotationsScanner~~ | \n| `get(FieldsAnnotated.with(A))` | getFieldsAnnotatedWith(A) | ~~FieldAnnotationsScanner~~ | \n| `get(Resources.with(regex))` | getResources(regex) | ~~ResourcesScanner~~ | \n| `get(MethodsParameter.with(P))` | getMethodsWithParameter(P) *(3)*\u003cbr\u003e~~getMethodsWithAnyParamAnnotated(P)~~| ~~MethodParameterScanner~~\u003cbr\u003e*obsolete* | \n| `get(MethodsSignature.of(P, ...))` | getMethodsWithSignature(P, ...) *(3)\u003cbr\u003e~~getMethodsMatchParams(P, ...)~~*| \" | \n| `get(MethodsReturn.of(T))` | getMethodsReturn(T) *(3)*| \" | \n| `get(ConstructorsParameter.with(P))` | getConstructorsWithParameter(P) *(3)\u003cbr\u003e~~getConstructorsWithAnyParamAnnotated(P)~~*| \" | \n| `get(ConstructorsSignature.of(P, ...))` | getConstructorsWithSignature(P, ...) *(3)\u003cbr\u003e~~getConstructorsMatchParams(P, ...)~~*| \" | \n\n*Note: `asClass()` and `as()` mappings were omitted*\n\n*(1): The equivalent of `getTypesAnnotatedWith(A)` is `get(SubTypes.of(TypesAnnotated.with(A)))`, including SubTypes*  \n\n*(2): MethodsAnnotatedScanner does not include constructor annotation scanning, use instead Scanners.ConstructorsAnnotated*  \n\n*(3): MethodParameterScanner is obsolete, use instead as required:  \nScanners.MethodsParameter, Scanners.MethodsSignature, Scanners.MethodsReturn, Scanners.ConstructorsParameter, Scanners.ConstructorsSignature*\n\u003c/details\u003e\n\n## ReflectionUtils\nApart from scanning classpath metadata using [Javassist](https://github.com/jboss-javassist/javassist), \nJava Reflection convenient methods are available using \n[ReflectionsUtils](https://ronmamo.github.io/reflections/org/reflections/ReflectionUtils.html):\n\n```java\nimport static org.reflections.ReflectionUtils.*;\n\nSet\u003cClass\u003c?\u003e\u003e    superTypes   = get(SuperTypes.of(T));\nSet\u003cField\u003e       fields       = get(Fields.of(T));\nSet\u003cConstructor\u003e constructors = get(Constructors.of(T));\nSet\u003cMethods\u003e     methods      = get(Methods.of(T));\nSet\u003cURL\u003e         resources    = get(Resources.with(T));\n\nSet\u003cAnnotation\u003e  annotations  = get(Annotations.of(T));\nSet\u003cClass\u003c? extends Annotation\u003e\u003e annotationTypes = get(AnnotationTypes.of(T));\n```\n\n*Previous ReflectionUtils 0.9.x API is still supported though marked for removal, more info in the javadocs.*\n\n## Query API\nEach Scanner and ReflectionUtils function implements [QueryBuilder](https://ronmamo.github.io/reflections/org/reflections/util/QueryBuilder.html), and supports:\n* `get()` - function returns direct values \n* `with()` or `of()` - function returns all transitive values\n\n*For example, `Scanners.SubTypes.get(T)` return direct subtypes, \nwhile `Scanners.SubTypes.of(T)` return transitive subtypes hierarchy. \nSame goes for `Scanners.TypesAnnotated` and `ReflectionUtils.SuperTypes` etc.*\n\nNext, each function implements [QueryFunction](https://ronmamo.github.io/reflections/org/reflections/util/QueryFunction.html), \nand provides fluent functional interface for composing `filter()`, `map()`, `flatMap()`, `as()` and more, such that:\n\n```java\n// filter, as/map\nQueryFunction\u003cStore, Method\u003e getters =\n  Methods.of(C1.class)\n    .filter(withModifier(Modifier.PUBLIC))\n    .filter(withPrefix(\"get\").and(withParametersCount(0)))\n    .as(Method.class);\n\n// compose Scanners and ReflectionUtils functions \nQueryFunction\u003cStore, Method\u003e methods = \n  SubTypes.of(type).asClass()  // \u003c-- classpath scanned metadata\n    .flatMap(Methods::of);     // \u003c-- java reflection api\n\n// function of function\nQueryFunction\u003cStore, Class\u003c? extends Annotation\u003e\u003e queryAnnotations = \n  Annotations.of(Methods.of(C4.class))\n    .map(Annotation::annotationType);\n```\n\nSee more in [ReflectionUtilsQueryTest](https://github.com/ronmamo/reflections/tree/master/src/test/java/org/reflections/ReflectionUtilsQueryTest.java)  \n\nA more complex example demonstrates getting merged annotations of rest controllers endpoints:\n```java\n// get all annotations of RequestMapping hierarchy (GetMapping, PostMapping, ...)\nSet\u003cClass\u003c?\u003e\u003e metaAnnotations =\n  reflections.get(TypesAnnotated.getAllIncluding(RequestMapping.class.getName()).asClass());\n\nQueryFunction\u003cStore, Map\u003cString, Object\u003e\u003e queryAnnotations =\n  // get all controller endpoint methods      \n  MethodsAnnotated.with(metaAnnotations).as(Method.class)\n    .map(method -\u003e\n      // get both method's + declaring class's RequestMapping annotations   \n      get(Annotations.of(method.getDeclaringClass())\n        .add(Annotations.of(method))\n        .filter(a -\u003e metaAnnotations.contains(a.annotationType())))\n        .stream()\n        // merge annotations' member values into a single hash map\n        .collect(new AnnotationMergeCollector(method)));\n\n// apply query and map merged hashmap into java annotation proxy\nSet\u003cRequestMapping\u003e mergedAnnotations = \n  reflections.get(mergedAnnotation\n    .map(map -\u003e ReflectionUtils.toAnnotation(map, metaAnnotation)));\n```\n\nCheck the [tests](src/test/java/org/reflections) folder for more examples and API usage\n\n### What else?\n- **Integrating with build lifecycle**  \nIt is sometime useful to `Reflections.save()` the scanned metadata into xml/json as part of the build lifecycle for generating resources, \nand then collect it on bootstrap with `Reflections.collect()` and avoid scanning. *See [reflections-maven](https://github.com/ronmamo/reflections-maven/) for example*.\n- [JavaCodeSerializer](https://ronmamo.github.io/reflections/org/reflections/serializers/JavaCodeSerializer.html) - scanned metadata can be persisted into a generated Java source code. \nAlthough less common, it can be useful for accessing types and members in a strongly typed manner. *(see [example](src/test/java/org/reflections/MyTestModelStore.java))*\n- [AnnotationMergeCollector](https://ronmamo.github.io/reflections/org/reflections/util/AnnotationMergeCollector.html) - can be used to merge similar annotations. *(see [test](src/test/java/org/reflections/ReflectionUtilsQueryTest.java#L216))*\n- `MemberUsageScanner` - experimental scanner allow querying for member usages `getMemberUsages()` of packages/types/elements in the classpath.\nCan be used for finding usages between packages, layers, modules, types etc.  \n\n----\n\n*Spread the spirit of open-source and collaboration, clean code and simplicity*\n","funding_links":["https://patreon.com/ronma","https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=WLN75KYSR6HAY"],"categories":["Projects","V. Tools for developing","项目","Java"],"sub_categories":["Introspection","8. Other","内省"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronmamo%2Freflections","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fronmamo%2Freflections","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fronmamo%2Freflections/lists"}