Inject code in patches #361
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
java
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
java-gi/java-gi!361
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "inject-patches"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Java-GI fork of JavaPoet has been extended to allow adding arbitrary codeblocks to generated classes. This is now used to generate methods that are added by Java-GI to GObject, GTypeInstance and a few other classes. Previously, these methods were generated with the JavaPoet API in the ClassGenerator and RecordGenerator, but it's much clearer to do this in the patch classes.
With this functionality it will be easier in the future to add or replace methods with custom code.