{"id":23483879,"url":"https://github.com/codesmell/annotation_sandbox","last_synced_at":"2025-07-08T12:36:18.399Z","repository":{"id":108722416,"uuid":"78143238","full_name":"CodeSmell/annotation_sandbox","owner":"CodeSmell","description":"Playing with Annotations","archived":false,"fork":false,"pushed_at":"2017-01-05T21:51:02.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T09:20:33.563Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/CodeSmell.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}},"created_at":"2017-01-05T19:49:40.000Z","updated_at":"2017-01-05T19:58:00.000Z","dependencies_parsed_at":"2023-03-13T05:16:17.343Z","dependency_job_id":null,"html_url":"https://github.com/CodeSmell/annotation_sandbox","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/CodeSmell%2Fannotation_sandbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSmell%2Fannotation_sandbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSmell%2Fannotation_sandbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeSmell%2Fannotation_sandbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeSmell","download_url":"https://codeload.github.com/CodeSmell/annotation_sandbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799984,"owners_count":21163404,"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-24T21:16:25.103Z","updated_at":"2025-04-14T00:19:12.441Z","avatar_url":"https://github.com/CodeSmell.png","language":"Java","readme":"# Annotation Sandbox\n\nPlaying with annotations \n\nThere are two projects \n* annotation-process\n* annotation-user\n\n## Annotation-Process\nThis project contains the annotations `FooBar` and `Rogue`\nIt also contains the annotation processor `FooBarProcessor`\nThe file `javax.annotation.processing.Processor` is located in the `META-INF/services` folder. This is how compile time annotation processors are registered. \n\nThe reason for the annotation processor being placed in a separate project was the need to supply the compilerArgument `-proc:none` to the maven compiler plugin so that annotation processing is disabled. See this [answer in Stack Overflow](http://stackoverflow.com/questions/6967514/maven-example-of-annotation-preprocessing-and-generation-of-classes-in-same-comp/6974117) for more information. \n\n\n## Annotation-User\nContains Java classes that are annotated with `FooBar` and/or `Rogue`\n\n### Compile Time processor\nWhen running `mvn clean compile` the annotation processor is triggered.\nThis should result in a list of the classes that have methods annotated with `FooBar` being written to stdin\n\n    [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ annotation-user ---\n    [INFO] Changes detected - recompiling the module!\n    [INFO] Compiling 2 source files to /Volumes/dev/annotation-sandbox/annotation-user/target/classes\n    FooBar annotates the method foo on class Foo with the value FooBar\n    FooBar annotates the method anotherMethod on class Foo with the value FooBar\n    FooBar annotates the method hello on class HelloWorld with the value hello world\n\n\n### Run Time processing\nThere is also a handler that uses Reflection to analyze classes at runtime. The current handler, `FooBarAnnotationRuntimeHandler` looks for all classes in the classpath that have a method annotated with `FooBar` and invokes the method. The current handler assumes that the classes will have a default constructor and that the method annotated with `FooBar` does not have any arguments.  ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesmell%2Fannotation_sandbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodesmell%2Fannotation_sandbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodesmell%2Fannotation_sandbox/lists"}