add doric remote js executor interface; update gradle
This commit is contained in:
@@ -51,7 +51,7 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
||||
|
||||
|
||||
private void initJSExecutor() {
|
||||
mDoricJSE = new DoricJSExecutor();
|
||||
mDoricJSE = new DoricNativeJSExecutor();
|
||||
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_LOG, new JavaFunction() {
|
||||
@Override
|
||||
public JavaValue exec(JSDecoder[] args) {
|
||||
|
@@ -11,11 +11,11 @@ import com.github.pengfeizhou.jscore.JavaValue;
|
||||
* @Author: pengfei.zhou
|
||||
* @CreateDate: 2019-07-18
|
||||
*/
|
||||
public class DoricJSExecutor implements IDoricJSE {
|
||||
public class DoricNativeJSExecutor implements IDoricJSE {
|
||||
|
||||
private final JSExecutor mJSExecutor;
|
||||
|
||||
public DoricJSExecutor() {
|
||||
public DoricNativeJSExecutor() {
|
||||
this.mJSExecutor = JSExecutor.create();
|
||||
}
|
||||
|
@@ -0,0 +1,39 @@
|
||||
package com.github.penfeizhou.doric.engine;
|
||||
|
||||
import com.github.pengfeizhou.jscore.JSDecoder;
|
||||
import com.github.pengfeizhou.jscore.JSRuntimeException;
|
||||
import com.github.pengfeizhou.jscore.JavaFunction;
|
||||
import com.github.pengfeizhou.jscore.JavaValue;
|
||||
|
||||
public class DoricRemoteJSExecutor implements IDoricJSE {
|
||||
|
||||
@Override
|
||||
public String loadJS(String script, String source) throws JSRuntimeException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSDecoder evaluateJS(String script, String source, boolean hashKey) throws JSRuntimeException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectGlobalJSFunction(String name, JavaFunction javaFunction) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void injectGlobalJSObject(String name, JavaValue javaValue) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSDecoder invokeMethod(String objectName, String functionName, JavaValue[] javaValues, boolean hashKey) throws JSRuntimeException {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void teardown() {
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user