|
|
|
|
@ -32,10 +32,6 @@ public class Global { |
|
|
|
|
private final QuickJSContext ctx; |
|
|
|
|
private final Timer timer; |
|
|
|
|
|
|
|
|
|
public static Global create(QuickJSContext ctx, ExecutorService executor) { |
|
|
|
|
return new Global(ctx, executor); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private Global(QuickJSContext ctx, ExecutorService executor) { |
|
|
|
|
this.executor = executor; |
|
|
|
|
this.timer = new Timer(); |
|
|
|
|
@ -43,6 +39,10 @@ public class Global { |
|
|
|
|
setProperty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static Global create(QuickJSContext ctx, ExecutorService executor) { |
|
|
|
|
return new Global(ctx, executor); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setProperty() { |
|
|
|
|
for (Method method : getClass().getMethods()) { |
|
|
|
|
if (!method.isAnnotationPresent(JSMethod.class)) continue; |
|
|
|
|
|