Skip to content
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

Changes how listeners and adapters are managed #527

Conversation

masesdevelopers
Copy link
Contributor

@masesdevelopers masesdevelopers commented Sep 17, 2024

Description

Changes how callbacks are managed returning a boolean value indicating if .NET has done an override. Then, if .NET hasn't done the override, in the Java side:

  • if the method belongs to an interface:
    • if there is a default implementation execute the default
    • otherwise throws an UnsupportedOperationException
  • if the method belongs to a class:
    • if the method is declared abstract throws an UnsupportedOperationException
    • otherwise execute the super class method

Warning

It can introduces a breaking change since Java methods request to be implemented in .NET if:

  • belongs to an interface and do not have a default implementation
  • belongs to a class and are declared abstract

Related Issue

fix #512

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…ing a boolean value indicating if .NET has done an override or, in case of classes, manages the default method or its super method.
@masesdevelopers masesdevelopers added enhancement New feature or request JNetReflector JNetReflector related issue labels Sep 17, 2024
@masesdevelopers masesdevelopers self-assigned this Sep 17, 2024
@masesdevelopers masesdevelopers merged commit 51ca008 into masesgroup:master Sep 18, 2024
7 checks passed
@masesdevelopers masesdevelopers deleted the 512-enhances-jnetreflector-to-manage-classes-that-needs-to-create-callbacks-in-net-2 branch September 18, 2024 11:57
masesdevelopers added a commit to masesdevelopers/JNet that referenced this pull request Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request JNetReflector JNetReflector related issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enhances JNetReflector to manage classes that needs to create Callbacks in .NET
1 participant