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

Checking if java class implements java interface #739

Closed
PanayotCankov opened this issue Apr 4, 2017 · 0 comments
Closed

Checking if java class implements java interface #739

PanayotCankov opened this issue Apr 4, 2017 · 0 comments
Assignees
Milestone

Comments

@PanayotCankov
Copy link
Contributor

In the android runtime:

if (curve instanceof android.view.animation.Interpolator)

was returning false for instances of android.view.animation.PathInterpolator.
The Interpolator is a java interface that is implemented by the PathInterpolator java class.
Is there a better way to handle this?
Is instanceof working when checking if JavaScript objects implement a java interface?

If it is not implemented, Symbol.hasInstance may be helpful.

@vtrifonov vtrifonov added this to the 4.1.0 milestone May 10, 2018
vhristov5555 pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue May 16, 2018
vhristov5555 pushed a commit to NativeScript/nativescript-cli-tests that referenced this issue May 21, 2018
* Add test for instanceof works for interfaces. NativeScript/android#739

* Update android_runtime_tests.py

* Update android_runtime_tests.py

* Update android_runtime_tests.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants