{"id":28674507,"url":"https://github.com/asrieldreemurrgm/java_reflections_and_annotations","last_synced_at":"2025-06-13T21:32:38.794Z","repository":{"id":298329345,"uuid":"999565787","full_name":"AsrielDreemurrGM/Java_Reflections_And_Annotations","owner":"AsrielDreemurrGM","description":"Study project focused on runtime reflections and custom annotations, showcasing how attributes can be used to interact with objects dynamically.","archived":false,"fork":false,"pushed_at":"2025-06-12T22:23:49.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-12T23:32:25.601Z","etag":null,"topics":["annotations","exceptions","java","oop","reflections","spring-tool-suite4"],"latest_commit_sha":null,"homepage":"","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/AsrielDreemurrGM.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-10T12:54:38.000Z","updated_at":"2025-06-12T22:23:53.000Z","dependencies_parsed_at":"2025-06-12T23:33:50.880Z","dependency_job_id":"abdb4d17-f4f3-4bde-ba31-90059c6296db","html_url":"https://github.com/AsrielDreemurrGM/Java_Reflections_And_Annotations","commit_stats":null,"previous_names":["asrieldreemurrgm/study_of_reflections","asrieldreemurrgm/java_reflections_and_annotations"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AsrielDreemurrGM/Java_Reflections_And_Annotations","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsrielDreemurrGM%2FJava_Reflections_And_Annotations","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsrielDreemurrGM%2FJava_Reflections_And_Annotations/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsrielDreemurrGM%2FJava_Reflections_And_Annotations/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsrielDreemurrGM%2FJava_Reflections_And_Annotations/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AsrielDreemurrGM","download_url":"https://codeload.github.com/AsrielDreemurrGM/Java_Reflections_And_Annotations/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AsrielDreemurrGM%2FJava_Reflections_And_Annotations/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259722856,"owners_count":22901813,"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":["annotations","exceptions","java","oop","reflections","spring-tool-suite4"],"created_at":"2025-06-13T21:30:35.165Z","updated_at":"2025-06-13T21:32:38.780Z","avatar_url":"https://github.com/AsrielDreemurrGM.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eStudy_Of_Reflections\u003c/h1\u003e\n\u003cp\u003e\n  \u003cstrong\u003eAbout\u003c/strong\u003e\u003cbr /\u003e\n  Study project focused on Java \u003cstrong\u003eReflections\u003c/strong\u003e and \u003cstrong\u003eCustom Annotations\u003c/strong\u003e, demonstrating how to interact with objects and metadata dynamically at runtime.\u003cbr /\u003e\n  It includes examples involving class analysis, constructor usage, field access, and annotation-based behavior replacement.\n\u003c/p\u003e\n\u003ch2\u003e📌 Features\u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003eCreated and used a custom annotation \u003ccode\u003eKeyType\u003c/code\u003e to identify entity keys (e.g., CPF or Product Code);\u003c/li\u003e\n  \u003cli\u003eUsed reflections to get class names, constructors, and method return types at runtime;\u003c/li\u003e\n  \u003cli\u003eDynamic instantiation and data printing using reflection API;\u003c/li\u003e\n  \u003cli\u003eHandled exceptions when fetching annotation values with detailed Javadocs;\u003c/li\u003e\n  \u003cli\u003eProject based on and adapted from a Java CRUD example I previously developed.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003e🗂️ Project Structure\u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003e\u003ccode\u003ebr.com.eaugusto.reflection\u003c/code\u003e: Contains reflection logic and main application \u003ccode\u003eAppReflections\u003c/code\u003e;\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ebr.com.eaugusto.model\u003c/code\u003e: Holds the \u003ccode\u003eProduct\u003c/code\u003e class with fields like code, description, and price;\u003c/li\u003e\n  \u003cli\u003e\u003ccode\u003ebr.com.eaugusto.annotations\u003c/code\u003e: Contains the \u003ccode\u003eKeyType\u003c/code\u003e annotation and related handling logic.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003e🚀 How to Run\u003c/h2\u003e\n\u003col\u003e\n  \u003cli\u003eClone the repository and open it in your IDE (STS, Eclipse, IntelliJ);\u003c/li\u003e\n  \u003cli\u003eRun \u003ccode\u003eAppReflections.java\u003c/code\u003e to see class and field reflection in action;\u003c/li\u003e\n  \u003cli\u003eExplore \u003ccode\u003eKeyType\u003c/code\u003e and see how it replaces logic from previous interfaces.\u003c/li\u003e\n  \u003cli\u003eAdditionally, run \u003ccode\u003eApp.java\u003c/code\u003e and see the CRUD in action.\u003c/li\u003e\n\u003c/ol\u003e\n\u003ch2\u003e📅 Commit Highlights\u003c/h2\u003e\n\u003ch3\u003eJune 11, 2025\u003c/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAdded exception handling in \u003ccode\u003egetKey()\u003c/code\u003e and documented it with Javadoc;\u003c/li\u003e\n  \u003cli\u003eCreated and applied \u003ccode\u003eKeyType\u003c/code\u003e annotation to entities (replacing \u003ccode\u003egetCodeOrCPF()\u003c/code\u003e);\u003c/li\u003e\n  \u003cli\u003eRemoved unnecessary storage logic to simplify the study focus;\u003c/li\u003e\n  \u003cli\u003eCopied base CRUD from a previous repository for annotation integration.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003eJune 10, 2025\u003c/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eImplemented logic to return method names and their types using reflection;\u003c/li\u003e\n  \u003cli\u003eSuppressed non-critical warnings specific to study context.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch3\u003eJune 9, 2025\u003c/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eCreated main class \u003ccode\u003eAppReflections\u003c/code\u003e using Java Reflection to get class details, instantiate objects and print data;\u003c/li\u003e\n  \u003cli\u003eCreated the \u003ccode\u003eProduct\u003c/code\u003e class with fields: \u003ccode\u003ecode\u003c/code\u003e, \u003ccode\u003edescription\u003c/code\u003e, and \u003ccode\u003eprice\u003c/code\u003e.\u003c/li\u003e\n\u003c/ul\u003e\n\u003ch2\u003e📚 Learning Goals\u003c/h2\u003e\n\u003cul\u003e\n  \u003cli\u003eUnderstand the use of Java Reflection to inspect and manipulate class structure at runtime;\u003c/li\u003e\n  \u003cli\u003eLearn how to create and apply custom annotations for metadata-driven logic;\u003c/li\u003e\n  \u003cli\u003eReplace interface logic with annotations for more flexible code design.\u003c/li\u003e\n\u003c/ul\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasrieldreemurrgm%2Fjava_reflections_and_annotations","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasrieldreemurrgm%2Fjava_reflections_and_annotations","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasrieldreemurrgm%2Fjava_reflections_and_annotations/lists"}