Refactor gobject constructors #195
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!195
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor-gobject-constructors"
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?
This PR refactors the Java-GI logic for registration and construction of GObject-derived classes.
super(...)during construction. TheMemorySegmentconstructor is not necessary anymore.null) and theng_object_newwill be called. The Java instance will then be used for the instance initialization, and the memory address will be updated to the new GObject's address. This means it is no longer necessary to use static factory methods for construction.Types.register()orTemplateTypes.register()is now optional.As a result, all remaining boilerplate that was necessary for GObject-derived classes in Java has now become optional.
This will (finally) fix #90