Better support for bridge methods on interfaces and abstract classes#133
Open
beckermarc wants to merge 3 commits into
Open
Better support for bridge methods on interfaces and abstract classes#133beckermarc wants to merge 3 commits into
beckermarc wants to merge 3 commits into
Conversation
Author
|
@basil Would you be willing to review this? 🙂 |
Author
|
@basil Sorry for bothering you again: Is there anything I can do additionally to get a review for this PR or anyone else whom I should contact? We would like to use this library in our project, but would need these additions to be able to use it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves support for bridge methods on interface methods and abstract methods.
Instead of making the bridge method abstract as well the bridge method can be configured to be a non abstract method directly containing the corresponding bridge implementation by setting the
stripAbstractproperty totrue.This simplifies usage of bridge methods on interfaces dramatically, as
@WithBridgeMethodson the interface method is sufficient in that case. It also enables a scenario that wasn't possible before: Bridge methods in multi-module projects where interfaces and implementing classes are defined in different modules, built after each other, not together.This behaviour is opt-in through the newly added property
stripAbstracton the@WithBridgeMethodsannotation. This ensures compatibility and continuity with existing abstract bridge methods and previously documented approaches how to achieve bridge methods on interfaces.As part of this change adapter methods defined within the interface itself have also been enabled.
Testing done
Existing test suite has been extended with tests for:
stripAbstractpropertyadapterpointing to a private interface methodstripAbstractSubmitter checklist