Android 注解处理器 GoldenGate

码农软件 · 软件分类 · 手机开发包 · 2019-05-05 06:13:37

软件介绍

GoldenGate 是一个 Android 注解处理器,用于生成类型安全的 JavaScript 绑定。 

示例代码:

JavaScriptBridge.setJsonSerializer(new JsonSerializer(){
    @Override
    <T> String toJson(T stuff) {
        // do stuff
    }

    @Override
    <T> T fromJson(String json, Class<T> type) {
        // do stuff
    }
});

@Bridge
interface MyJavascript {
    void calculateSomeValue(Callback<Integer> value);
}

Webview webview = ...;
MyJavascript bridge = new MyJavascriptBridge(webview);
bridge.calculateSomeValue(new Callback<Integer>() {
    @Override
    void onResult(Integer result) {
        // do something with result
    }
});

本文地址:https://codercto.com/soft/d/5045.html

Trading and Exchanges

Trading and Exchanges

Larry Harris / Oxford University Press, USA / 2002-10-24 / USD 95.00

This book is about trading, the people who trade securities and contracts, the marketplaces where they trade, and the rules that govern it. Readers will learn about investors, brokers, dealers, arbit......一起来看看 《Trading and Exchanges》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

html转js在线工具
html转js在线工具

html转js在线工具