Skip to content

Conversation

@radekdoulik
Copy link
Member

And use it from Java side in place of the old
Java.Interop.TypeManager and its Activate method. As it is based
on JavaObject, it will work nicely with the jnimarshalmethod-gen.

@radekdoulik radekdoulik requested a review from jonpryor April 10, 2018 18:57
}
}

public class JavaTypeManager : JavaObject
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this type be internal instead of public?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully yes. I think it should be only used from Mono.Android and the generated code, which should end up in the Mono.Android as well.

I will test whether it will indeed work in the real apk.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It better work, or we'd implicitly be requiring that all Java.Lang.Object subclasses in all assemblies be public, which is not a pre-existing requirement. :-)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works OK here. with new marshal methods and in fallback as well.

@radekdoulik radekdoulik force-pushed the pr-java-object-based-type-manager branch from 393a6e5 to c2697af Compare April 10, 2018 22:01
@jonpryor
Copy link
Contributor

Out of curiosity, why inherit JavaObject and not Java.Lang.Object? (I'm not asking that we change it; I'm just curious.)

And use it from Java side in place of the old
`Java.Interop.TypeManager` and its `Activate` method. As it is based
on `JavaObject`, it will work nicely with the *jnimarshalmethod-gen*.
@radekdoulik radekdoulik force-pushed the pr-java-object-based-type-manager branch from c2697af to 1712e21 Compare April 11, 2018 08:31
@radekdoulik
Copy link
Member Author

Good question. Actually I don't remember :-) So I guess no particular reason. Thus I rebased it on Java.Lang.Object and added RegisterAttribute to the class, so that an unwanted Acw is not generated.

@jonpryor
Copy link
Contributor

On-device unit tests weren't executed on the macOS+xbuild PR Build run, so I restarted it to ensure we didn't break runtime tests.

@jonpryor jonpryor merged commit 0140ab8 into dotnet:master Apr 11, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Feb 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants