{"id":37022618,"url":"https://github.com/bnorm/auto-weave","last_synced_at":"2026-01-14T02:42:16.902Z","repository":{"id":57717921,"uuid":"59307266","full_name":"bnorm/auto-weave","owner":"bnorm","description":"AutoWeave generates AOP weaved classes using Java Annotation Processing","archived":true,"fork":false,"pushed_at":"2016-07-06T03:23:38.000Z","size":85,"stargazers_count":8,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-30T22:34:52.191Z","etag":null,"topics":["android","annotations","aop","java-annotation-processing"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bnorm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-20T15:54:05.000Z","updated_at":"2022-12-21T18:10:42.000Z","dependencies_parsed_at":"2022-08-24T11:11:02.558Z","dependency_job_id":null,"html_url":"https://github.com/bnorm/auto-weave","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/bnorm/auto-weave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fauto-weave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fauto-weave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fauto-weave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fauto-weave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bnorm","download_url":"https://codeload.github.com/bnorm/auto-weave/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bnorm%2Fauto-weave/sbom","scorecard":{"id":246095,"data":{"date":"2025-08-11","repo":{"name":"github.com/bnorm/auto-weave","commit":"0ebb80f57c1614bc95f5b45f95ae1f78413e870a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":0,"reason":"Found 0/30 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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"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":-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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE.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":"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":"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 'master'"],"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"}}]},"last_synced_at":"2025-08-17T07:38:29.701Z","repository_id":57717921,"created_at":"2025-08-17T07:38:29.701Z","updated_at":"2025-08-17T07:38:29.701Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408712,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":["android","annotations","aop","java-annotation-processing"],"created_at":"2026-01-14T02:42:16.110Z","updated_at":"2026-01-14T02:42:16.894Z","avatar_url":"https://github.com/bnorm.png","language":"Java","readme":"# auto-weave\n\n\u003c!--- All the badges! ---\u003e\n[![Maven Central](https://img.shields.io/maven-central/v/com.bnorm.auto.weave/auto-weave.svg?maxAge=7200\u0026style=flat-square)](http://mvnrepository.com/artifact/com.bnorm.auto.weave/auto-weave)\n[![Travis](https://img.shields.io/travis/bnorm/auto-weave.svg?maxAge=7200\u0026style=flat-square)](https://travis-ci.org/bnorm/auto-weave)\n[![Codecov](https://img.shields.io/codecov/c/github/bnorm/auto-weave.svg?maxAge=7200\u0026style=flat-square)](https://codecov.io/gh/bnorm/auto-weave)\n[![Codacy](https://img.shields.io/codacy/ba632994831044a2b3049a5a17e26c45.svg?maxAge=7200\u0026style=flat-square)](https://www.codacy.com/app/bnorm/auto-weave)\n[![VersionEye](https://img.shields.io/versioneye/d/user/projects/57489055ce8d0e00360be076.svg?maxAge=7200\u0026style=flat-square)](https://www.versioneye.com/user/projects/57489055ce8d0e00360be076)\n\nAutoWeave generates AOP weaved classes using Java Annotation Processing.\n\nNow available on Maven Central, see maven central badge for the latest version.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.bnorm.auto.weave\u003c/groupId\u003e\n    \u003cartifactId\u003eauto-weave\u003c/artifactId\u003e\n    \u003cversion\u003e${auto-weave.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nIt works something like this...\n\n```java\n@AutoWeave\npublic abstract class Target {\n    public static Target create() { return new AutoWeave_Target(); }\n    @Trace String method() {...}\n}\n\n@interface Trace {...}\n\npublic class TraceAspect {\n    @AutoAdvice(Trace.class)\n    public Object around(AroundJoinPoint point) {\n        System.out.println(\"Starting method \" + point.method());\n        Object result = point.proceed();\n        System.out.println(\"Completed method \" + point.method() + \" with a result of \" + result);\n        return result;\n    }\n}\n\n// Generated by auto-weave\nfinal class AutoWeave_Target extends Target {\n    private static final StaticPointcut methodPointcut = StaticPointcut.create(\"method\", Target.class, String.class, Arrays.\u003cClass\u003c?\u003e\u003easList());\n    private final TraceAspect traceAspect = new TraceAspect();\n    private final Advice[] methodAdvice = new Advice[] {\n    new AroundAdvice() {\n        @Override\n        public Object around(AroundJoinPoint joinPoint) {\n            return traceAspect.around(joinPoint);\n        }\n    }\n    };\n\n    @Override\n    @Trace\n    public String method() {\n        return (String) new Chain(methodAdvice, this, methodPointcut, Arrays.\u003cObject\u003easList()) {\n            @Override\n            public Object call() throws Throwable {\n                return AutoWeave_Target.super.method();\n            }\n        }.proceed();\n    }\n}\n```\n\n## Advice\n\nThere are 5 different types of Advice available in this library:\n - Before - Called before the method is run\n - Around - Weaved into the call stack\n - After - Called after the method is run regardless of result\n - AfterReturning - Called after the method returns\n - AfterThrowing - Called after the method throws an exception\n\nTo create Advice, create a class with a default constructor.  Then add\nmethods annotated with @AutoAdvice and the following signatures:\n - Before - Returns void with a single parameter: BeforeJoinPoint\n - Around - Returns Object with a single parameter: AroundJoinPoint\n - After - Returns void with a single parameter: AfterJoinPoint\n - AfterReturning - Returns void with a single parameter: AfterReturningJoinPoint\n - AfterThrowing - Returns void with a single parameter: AfterThrowingJoinPoint\n\nNote: for around advice, AroundJoinPoint.proceed() needs to be called\nat some point because this will continue the call stack and return the\nresult of the weaved method.\n\nTo control how the advice classes are instantiated, use the @AutoAspect\nannotation.  This annotation allows 3 different instantiation stategies:\n - Instance - New class with each new instance of weaved class (member)\n - Class - New class for each weaved class (static member)\n - Singleton - Class must provide an instance of itself\n\nNote: for singleton aspects, use an enum with a single value (Effective\nJava - Item 3) or have a single `public static final` field with the same\ntype as the aspect class.  This instance of the class will be used when\ncalling advice.\n\n## Android\n\nThis type of AOP can be quite useful in Android because of build\nflavors.  Place the annotations and @AutoWeave annotation on any\nclasses you would want to be weaved.  Then always use the AutoWave_*\ngenerated class when an instance is required.  Even if no aspects are\napplied to the weaved class, an AutoWeave_* class will always be\ngenerated.\n\nThen, in a build flavor directory - debug for example - add the aspect\nclasses with the advice methods.  Now the advice will be applied to the\nweaved classes in the debug build.\n\n## License\n\n    Copyright 2016 Brian Norman\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnorm%2Fauto-weave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbnorm%2Fauto-weave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbnorm%2Fauto-weave/lists"}