masesgroup / JNet

Java/JVM suite for .NET: a comprehensive suite of libraries and tools to use Java/JVM APIs (Java, Scala, Kotlin, ...) and .NET side-by-side
https://jnet.masesgroup.com/
Apache License 2.0
28 stars 3 forks source link

Latest feature `ClassesWithCallbacks` does not work as expected #541

Open masesdevelopers opened 2 hours ago

masesdevelopers commented 2 hours ago

Using latest version of JNetReflector it is not possible to obtain the expected result. With the first attempt using android.app.Activity it is possible to highlight that the following configuration snippet

  "ClassesWithCallbacks": [
    {
      "ClassName": "android.app.Activity",
      "Patterns": [
        "on*"
      ]
    }
  ],

fails the generation with:

  • Patterns does not work and all methods are created as callbacks then compiling Java side most of the errors reports overridden method is final
  • in .NET side all methods are callbacks (implicitly from the previous), but some other information, like fields, are removed

Originally posted by @masesdevelopers in https://github.com/masesgroup/netdroid/issues/75#issuecomment-2372629131

masesdevelopers commented 2 hours ago

See https://github.com/masesgroup/netdroid/issues/75#issuecomment-2372641686 for other points