Skip to content

Checking if java class implements java interface #739

@PanayotCankov

Description

@PanayotCankov

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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions