-
Notifications
You must be signed in to change notification settings - Fork 1
Multi weaver #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: staging
Are you sure you want to change the base?
Multi weaver #46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the JavaWeaver architecture to support multiple weaver instances by threading a JavaWeaver parameter through the codebase. Previously, the system relied on static/thread-local access to the weaver, which limited concurrent usage.
Changes:
- Refactored converter classes to use
BiFunctionClassMapinstead ofFunctionClassMap, addingJavaWeaveras a parameter - Updated all joinpoint constructors and factory methods to accept and pass
JavaWeaverinstances - Modified the TypeScript API to include
Weaver.getWeaverEngine()calls - Removed static weaver access methods in favor of instance-based access
Reviewed changes
Copilot reviewed 79 out of 79 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Kadabra-JS/src-api/kadabra/KadabraNodes.ts | Added Weaver.getWeaverEngine() calls to all factory methods |
| JavaWeaver/src/weaver/utils/weaving/converters/*.java | Migrated from FunctionClassMap to BiFunctionClassMap with JavaWeaver parameter |
| JavaWeaver/src/weaver/kadabra/joinpoints/*.java | Updated all constructors and factory methods to accept JavaWeaver parameter |
| JavaWeaver/src/weaver/kadabra/abstracts/AJavaWeaverJoinPoint.java | Added weaver parameter to constructor and updated helper methods |
| JavaWeaver/src/weaver/kadabra/JavaWeaver.java | Removed static getJavaWeaver() and getFactory() methods |
| JavaWeaver/.gitignore | Excluded AJavaWeaverJoinPoint.java from ignore pattern |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Updated FunctionalClassGenerator to accept JavaWeaver as a parameter for method generation. - Modified ActionUtils to pass JavaWeaver instance during code insertion and expression replacement. - Enhanced SelectUtils to utilize JavaWeaver in join point conversions for statements and expressions. - Refactored CtElement2JoinPoint and related converters to support JavaWeaver, ensuring all join point creations are consistent with the new structure. - Adjusted converters for executable, expression, statement, type, and XML node to include JavaWeaver, improving integration and functionality.
ff5656b to
a92b9ec
Compare
…Converters. An explicit entry is now present to ensure the proper joinpoint is created.
No description provided.