翰林优商.apk(点击下载) / Result.java


package com.mobile.auth.gatewayauth.model.pns_vendor_query;

import com.mobile.auth.gatewayauth.ExceptionProcessor;
import com.nirvana.tools.jsoner.JSONUtils;
import com.nirvana.tools.jsoner.Jsoner;
import com.umeng.analytics.pro.am;
import java.lang.reflect.Field;
import java.util.List;
import org.json.JSONException;
import org.json.JSONObject;

public class Result implements Jsoner {
    private String code;
    private String message;
    private Module module;

    @Override // com.nirvana.tools.jsoner.Jsoner
    public void fromJson(JSONObject jSONObject) {
        try {
            JSONUtils.fromJson(jSONObject, this, (List<Field>) null);
            Module module2 = new Module();
            if (jSONObject != null) {
                module2.fromJson(jSONObject.optJSONObject(am.e));
            }
            setModule(module2);
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
        }
    }

    public String getCode() {
        try {
            return this.code;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
            return null;
        }
    }

    public String getMessage() {
        try {
            return this.message;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
            return null;
        }
    }

    public Module getModule() {
        try {
            return this.module;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
            return null;
        }
    }

    public void setCode(String str) {
        try {
            this.code = str;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
        }
    }

    public void setMessage(String str) {
        try {
            this.message = str;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
        }
    }

    public void setModule(Module module2) {
        try {
            this.module = module2;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
        }
    }

    @Override // com.nirvana.tools.jsoner.Jsoner
    public JSONObject toJson() {
        try {
            JSONObject json = JSONUtils.toJson(this, null);
            try {
                Module module2 = this.module;
                json.put(am.e, module2 == null ? new JSONObject() : module2.toJson());
            } catch (JSONException e) {
                e.printStackTrace();
            }
            return json;
        } catch (Throwable th) {
            ExceptionProcessor.processException(th);
            return null;
        }
    }
}