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

Create the classes of Listener/Adapter and so on #137

Closed
masesdevelopers opened this issue Feb 24, 2023 · 6 comments · Fixed by #184 or #185
Closed

Create the classes of Listener/Adapter and so on #137

masesdevelopers opened this issue Feb 24, 2023 · 6 comments · Fixed by #184 or #185
Assignees
Labels
enhancement New feature or request JNet JNet related issue JNetReflector JNetReflector related issue

Comments

@masesdevelopers
Copy link
Contributor

So in first instance if a class name ends with Listener the tool can avoid its reflection, but in general a tool like JNetReflector cannot distinguish which interface, or class, shall be managed in different way only because it represents a callback.

The previous will be implemented checking if the class name ends with Listener or Adapter, and will be added a command line switch ClassesToBeListener to list all classes which are events callback and be treated as a Listener. Anyway the implementation, till now, shall be done manually.

Remember to create the classes: now they are reported, during compilation, as a warning. The possible options are:

  • create the classes manually
  • find a way to build them automatically following a generation pattern

Originally posted by @masesdevelopers in #130 (comment)

@masesdevelopers masesdevelopers self-assigned this Feb 24, 2023
@masesdevelopers masesdevelopers added enhancement New feature or request JNet JNet related issue labels Feb 24, 2023
@masesdevelopers
Copy link
Contributor Author

Some classes can be created from JNetReflector checking if they inherit from any of the one manually made

@masesdevelopers masesdevelopers added the JNetReflector JNetReflector related issue label Mar 28, 2023
@masesdevelopers masesdevelopers changed the title Create the classes of Listener/Adpater and so on Create the classes of Listener/Adapater and so on May 4, 2023
@masesdevelopers masesdevelopers changed the title Create the classes of Listener/Adapater and so on Create the classes of Listener/Adapter and so on May 4, 2023
@masesdevelopers
Copy link
Contributor Author

Some classes can be created from JNetReflector checking if they inherit from any of the one manually made

If a Class implements the Listener interfaces shall not be a Listener too.

@masesdevelopers
Copy link
Contributor Author

Use always JVMBridgeException when there is an exception type in parameters to have an unified approach between listeners and methods

masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 10, 2023
… Java interface

masesgroup#137: created the stub methods of the listener interface, first step to introduce auto generated Listeners
masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 10, 2023
…end it

masesgroup#178 (comment): classes with a single interface which isn't a listener inherits from interface implementation class
masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 10, 2023
… an exception type in parameters to have an unified approach between listeners and methods
masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 10, 2023
masesdevelopers added a commit that referenced this issue Jun 12, 2023
* #178: update JNetReflector to manage Main-Class with new IJNetBridgeMain, remove keyword from argument names, improved management of generic super-classes, improved management of generics in constructor arguments

* #178: upgrade code after change into JNetReflector

* Added build and create to the list of names to be avoided in Properties

* #178 (comment): added switch to rename classes, better management of return type in generics

* #178 (comment)

* #178 (comment)

* #178 (comment): created interfaces for each Class that is a Java interface
#137: created the stub methods of the listener interface, first step to introduce auto generated Listeners

* #178 (comment): added where clause based on interfaces and forced the new constraint

* #178 (comment): when a constraint is a native type it is removed

* #178 (comment): fixed not matching declaration

* #178 (comment): removed many warning during compilation related to newly added interfaces

* Update classes with warning removal

* #178 (comment): update where clause generation when a generic class depends on itself when extended

* #178 (comment): added switches related to interface generation

* #178 (comment): management of Iterator and update retriever of generic type defined for Iterator and Iterable

* #178 (comment): fixed generation of avoid interfaces

* #137: concrete classes implementing a Listener does not extend it
#178 (comment): classes with a single interface which isn't a listener inherits from interface implementation class

* #137 (comment): Use always JVMBridgeException when there is an exception type in parameters to have an unified approach between listeners and methods

* Code update for #137 (comment)

* Folder structure review: Extensions moved under Specific

* #178 (comment): limited super interfaces

* #178 (comment): solved base class inheritance from avoided types

* #178 (comment): JVMInterfaceName shall use GetGenerics to get the real type

* #178 (comment): added avoidance check of inner types

* #178 (comment): Added namespace to IJNetBridgeMain
masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 18, 2023
@masesdevelopers
Copy link
Contributor Author

The following shall be made manually:

  • java.util.Comparator
  • java.util.ServiceLoader$Provider

@masesdevelopers
Copy link
Contributor Author

The following shall be made manually:

* `java.util.Comparator`

* `java.util.ServiceLoader$Provider`

java.util.ServiceLoader$Provider will be avoid till now

masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 19, 2023
masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 20, 2023
masesdevelopers added a commit that referenced this issue Jun 20, 2023
* #137: added creation and management of Listener classes

* Fully update with Listeners: to be tested and cleaned

* Fix docker with JRE 11

* #137 (comment): added partial version of Comparator

* Updates on generated help

* #137: aligned manually made Listeners; MouseInputAdapter does not have generated C# counterpart
@mariomastrodicasa
Copy link

@masesdevelopers PR #184 contains this sentence "MouseInputAdapter does not have generated C# counterpart", I reopen the issue

masesdevelopers added a commit to masesdevelopers/JNet that referenced this issue Jun 21, 2023
masesdevelopers added a commit that referenced this issue Jun 21, 2023
…ar classes (#185)

* #137 (comment): update to manage methods in Adapter classes

* #137 (comment): full class rebuild
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment