Stick Squad 3 v1.2.5.9版本的 MD5 值为:375cf7f77a7075270cd68d1397368279

以下内容为反编译后的 AerServConfig.java 源代码,内容仅作参考


package com.fusepowered.as;

import android.content.Context;
import java.util.ArrayList;
import java.util.List;

public class AerServConfig {
    private static final String headerName = "X-AerServ";
    private static final String stagingBaseUrl = "http://staging.ads.aerserv.com/as/?key=2";
    private Context context;
    private String plc;
    private static boolean debug = false;
    private static boolean verbose = false;
    private static final String productionBaseUrl = "http://ads.aerserv.com/as/?key=2";
    private static String baseUrl = productionBaseUrl;
    private boolean preload = false;
    private int timeout = Integer.MAX_VALUE;
    private List<String> keywords = new ArrayList();
    private AerServEventListener eventListener = new AerServEventListener() {
        @Override
        public void onAerServEvent(AerServEvent aerServEvent, List<Object> list) {
        }
    };

    public String toString() {
        return String.format("Context: %s, PLC: %s, Debug: %b, Preload: %b, Timeout: %d, Keywords: %s", this.context.toString(), this.plc, Boolean.valueOf(debug), Boolean.valueOf(this.preload), Integer.valueOf(this.timeout), this.keywords.toString());
    }

    public AerServConfig(Context context, String str) {
        if (context == null) {
            throw new IllegalArgumentException("AerServConfig cannot be constructed with a null context");
        }
        if (str == null || str.equals("") || !str.matches("[0-9]+")) {
            throw new IllegalArgumentException("AerServConfig cannot be constructed with bad PLC \"" + str + "\"");
        }
        this.context = context;
        this.plc = str;
    }

    public Context getContext() {
        return this.context;
    }

    public String getPlc() {
        return this.plc;
    }

    public List<String> getKeywords() {
        return this.keywords;
    }

    public static String getBaseUrl() {
        return baseUrl;
    }

    public static String getHeaderName() {
        return headerName;
    }

    public AerServConfig setProductionBaseUrl() {
        baseUrl = productionBaseUrl;
        return this;
    }

    public AerServConfig setStagingBaseUrl() {
        baseUrl = stagingBaseUrl;
        return this;
    }

    public AerServConfig setBaseUrl(String str) {
        baseUrl = str;
        return this;
    }

    public static void setToStagingUrl() {
        baseUrl = stagingBaseUrl;
    }

    public static void setToProductionUrl() {
        baseUrl = productionBaseUrl;
    }

    public AerServConfig setKeywords(List<String> list) {
        this.keywords = list;
        return this;
    }

    public AerServConfig setTimeout(int i) {
        this.timeout = i;
        return this;
    }

    public AerServConfig setDebug(boolean z) {
        debug = z;
        return this;
    }

    public AerServConfig setVerbose(boolean z) {
        verbose = z;
        return this;
    }

    public AerServConfig setEventListener(AerServEventListener aerServEventListener) {
        if (aerServEventListener == null) {
            throw new IllegalArgumentException("Cannot call setEventListener with a null listener");
        }
        this.eventListener = aerServEventListener;
        return this;
    }

    public AerServConfig setPreload(boolean z) {
        this.preload = z;
        return this;
    }

    public static boolean isDebug() {
        return debug;
    }

    public static boolean isVerbose() {
        return verbose;
    }

    public AerServEventListener getEventListener() {
        return this.eventListener;
    }

    public boolean isPreload() {
        return this.preload;
    }

    public int getTimeout() {
        return this.timeout;
    }
}