()
| 60 | } |
| 61 | |
| 62 | private void setProperty() { |
| 63 | for (Method method : getClass().getMethods()) { |
| 64 | if (!method.isAnnotationPresent(JSMethod.class)) continue; |
| 65 | ctx.getGlobalObject().setProperty(method.getName(), args -> { |
| 66 | try { |
| 67 | return method.invoke(this, args); |
| 68 | } catch (Exception e) { |
| 69 | return null; |
| 70 | } |
| 71 | }); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | private boolean submit(Runnable runnable) { |
| 76 | try { |