masesgroup/JNet

Avoid use of `string` (`System.String`) and prefer `Java.Lang.String`

masesdevelopers opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Currently JNetReflector use string (System.String) to reflect Java.Lang.String, however to better cover JVM types the Java.Lang.String type is better. The corresponding .NET string (System.String) type is managed from implicit converters.

Describe the solution you'd like
Remove the conversion to .NET string (System.String) and prefer Java.Lang.String instead.

Describe alternatives you've considered
N/A

Additional context
N/A

This issue can extended using native types only when JVM counter-part is a native type, otherwise use the JVM class.
Some examples are:

  • bool when there is a JVM boolean, otherwise use Java.Lang.Boolean which can be managed like a Nullable type in .NET withbool?
  • int when there is a JVM int, otherwise use Java.Lang.Integer which can be managed like a Nullable type in .NET withint?