eclipsesource / eclipsesource/J2V8

method overloading support?

Open
#109 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
2.6k
Forks
387
PR merge metrics
No merged PRs in 30d

Description

Android Object Binding Sample

``` java
V8Object v8Obj = new V8Object(v8);

v8.add("tv", v8Obj);

v8Obj.registerJavaMethod(tvResult, "setTextSize", "setTextSize", new Class[]{float.class});
v8Obj.registerJavaMethod(tvResult, "setTextSize", "setTextSize", new Class[]{int.class, float.class});

v8Obj.release();

```

``` javascript
tv.setTextSize(50);
```

Caused by: java.lang.IllegalArgumentException: argument type mismatch
at com.eclipsesource.v8.V8.checkArgs(V8.java:800)
at com.eclipsesource.v8.V8.callVoidJavaMethod(V8.java:783)
at com.eclipsesource.v8.V8._executeVoidScript(Native Method) 

Please support the method overloading.
Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.