当前位置: 首页>>代码示例>>Java>>正文


Java InspectorModulesProvider类代码示例

本文整理汇总了Java中com.facebook.stetho.InspectorModulesProvider的典型用法代码示例。如果您正苦于以下问题:Java InspectorModulesProvider类的具体用法?Java InspectorModulesProvider怎么用?Java InspectorModulesProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


InspectorModulesProvider类属于com.facebook.stetho包,在下文中一共展示了InspectorModulesProvider类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: RealmInspectorModulesProvider

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
private RealmInspectorModulesProvider(String packageName,
                                      InspectorModulesProvider baseProvider,
                                      File folder,
                                      boolean withMetaTables,
                                      Pattern databaseNamePattern,
                                      long limit,
                                      boolean ascendingOrder,
                                      byte[] defaultEncryptionKey,
                                      Map<String, byte[]> encryptionKeys) {
    this.packageName = packageName;
    this.baseProvider = baseProvider;
    this.folder = folder;
    this.withMetaTables = withMetaTables;
    if (databaseNamePattern == null) {
        this.databaseNamePattern = DEFAULT_DATABASE_NAME_PATTERN;
    } else {
        this.databaseNamePattern = databaseNamePattern;
    }
    this.limit = limit;
    this.ascendingOrder = ascendingOrder;
    this.defaultEncryptionKey = defaultEncryptionKey;
    this.encryptionKeys = encryptionKeys == null ? Collections.<String, byte[]>emptyMap() : encryptionKeys;
}
 
开发者ID:gjyaiya,项目名称:StethoRealm,代码行数:24,代码来源:RealmInspectorModulesProvider.java

示例2: build

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
public RealmInspectorModulesProvider build() {
    final InspectorModulesProvider baseProvider =
            (this.baseProvider != null)
                    ? this.baseProvider
                    : Stetho.defaultInspectorModulesProvider(applicationContext);

    //noinspection deprecation
    return new RealmInspectorModulesProvider(
            applicationContext.getPackageName(),
            baseProvider,
            folder,
            withMetaTables,
            databaseNamePattern,
            limit,
            ascendingOrder,
            defaultEncryptionKey,
            encryptionKeys);
}
 
开发者ID:gjyaiya,项目名称:StethoRealm,代码行数:19,代码来源:RealmInspectorModulesProvider.java

示例3: StethoRealmInspectorModulesProvider

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
StethoRealmInspectorModulesProvider(Context applicationContext,
    InspectorModulesProvider baseProvider, File[] dirs, Pattern namePattern,
    Map<String, byte[]> encryptionKeys) {
    this.applicationContext = applicationContext;
    this.baseProvider = baseProvider;
    this.dirs = dirs;
    this.namePattern = namePattern;
    this.encryptionKeys = encryptionKeys;
}
 
开发者ID:xizzhu,项目名称:stetho-realm,代码行数:10,代码来源:StethoRealmInspectorModulesProvider.java

示例4: createWebkitModulesProvider

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
private InspectorModulesProvider createWebkitModulesProvider() {
    return () -> new Stetho.DefaultInspectorModulesBuilder(context).runtimeRepl(
            new JsRuntimeReplFactoryBuilder(context)
                    .addFunction("activity", new BaseFunction() {
                        @Override
                        public Object call(org.mozilla.javascript.Context cx, Scriptable scope, Scriptable thisObj, Object[] args) {
                            return activityProvider.getCurrentActivity();
                        }
                    }).build()
    ).finish();
}
 
开发者ID:Nilhcem,项目名称:droidconde-2016,代码行数:12,代码来源:StethoInitializer.java

示例5: wrap

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
@Deprecated
public static RealmInspectorModulesProvider wrap(Context context,
                                                 InspectorModulesProvider provider,
                                                 boolean withMetaTables,
                                                 Pattern databaseNamePattern) {
    return new RealmInspectorModulesProvider(context.getPackageName(), provider, context.getFilesDir(), withMetaTables, databaseNamePattern, DEFAULT_LIMIT, DEFAULT_ASCENDING_ORDER, null, null);
}
 
开发者ID:gjyaiya,项目名称:StethoRealm,代码行数:8,代码来源:RealmInspectorModulesProvider.java

示例6: onCreate

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
@Override
    public void onCreate() {
        super.onCreate();
        if (null == demoAppContext) {
            demoAppContext = getApplicationContext();
        }
//        queues = Volley.newRequestQueue(demoAppContext);
//        CrashHandler crashHandler = CrashHandler.getInstance();
//        crashHandler.init(getApplicationContext());
//        crashHandler.initActivityContainer(container);
        container = new ArrayList<>(5);

        if (Constants.IS_OPEN_UI_BLOCK_CANARY) {
            sContext = this;
            BlockCanary.install(this, new DemoBlockCanaryContext()).start();
        }
        if (Constants.IS_OPEN_LEAK_CANARY) {
            refWatcher = initLeakCanary();
        }

        if (Constants.IS_OPEN_STETHO) {
            // 查看 dumpapp 信息
//            Stetho.initialize(Stetho.newInitializerBuilder(this).enableDumpapp(new DumperPluginsProvider() {
//                @Override
//                public Iterable<DumperPlugin> get() {
//                    return new Stetho.DefaultDumperPluginsBuilder(DemoApplication.this).provide(new HelloWorldDumperPlugin()).provide(new APODDumperPlugin(DemoApplication.this.getContentResolver())).finish();
//                }
//            }).enableWebKitInspector(new ExtInspectorModulesProvider(DemoApplication.this)).build());
            // 调用 JS
            Stetho.initialize(Stetho.newInitializerBuilder(DemoApplication.this).enableWebKitInspector(new InspectorModulesProvider() {
                @Override
                public Iterable<ChromeDevtoolsDomain> get() {
                    return new Stetho.DefaultInspectorModulesBuilder(DemoApplication.this).runtimeRepl(new JsRuntimeReplFactoryBuilder(DemoApplication.this)
                            // Pass to JavaScript: var foo = "bar";
                            .addVariable("foo", "bar").build()).finish();
                }
            }).build());
        }

    }
 
开发者ID:BruceHurrican,项目名称:asstudydemo,代码行数:41,代码来源:DemoApplication.java

示例7: baseProvider

import com.facebook.stetho.InspectorModulesProvider; //导入依赖的package包/类
public ProviderBuilder baseProvider(InspectorModulesProvider provider) {
    baseProvider = provider;
    return this;
}
 
开发者ID:gjyaiya,项目名称:StethoRealm,代码行数:5,代码来源:RealmInspectorModulesProvider.java


注:本文中的com.facebook.stetho.InspectorModulesProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。