.class public abstract Lcom/moji/mvpframe/BasePresenter;
.super Ljava/lang/Object;
.source "BasePresenter.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "<A:",
        "Ljava/lang/Object;",
        "V::",
        "Lcom/moji/mvpframe/IMJMvpView;",
        ">",
        "Ljava/lang/Object;"
    }
.end annotation


# instance fields
.field protected e:Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TA;"
        }
    .end annotation
.end field

.field protected f:Lcom/moji/mvpframe/IMJMvpView;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "TV;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Lcom/moji/mvpframe/IMJMvpView;)V
    .locals 0
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(TV;)V"
        }
    .end annotation

    .line 22
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 23
    iput-object p1, p0, Lcom/moji/mvpframe/BasePresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    .line 24
    invoke-virtual {p0}, Lcom/moji/mvpframe/BasePresenter;->b()Ljava/lang/Object;

    move-result-object p1

    iput-object p1, p0, Lcom/moji/mvpframe/BasePresenter;->e:Ljava/lang/Object;

    .line 25
    invoke-direct {p0}, Lcom/moji/mvpframe/BasePresenter;->d()V

    return-void
.end method

.method private b(Lcom/moji/requestcore/entity/AbsBaseEntity;Z)Z
    .locals 2

    .line 114
    iget-object v0, p0, Lcom/moji/mvpframe/BasePresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    new-instance v1, Lcom/moji/mvpframe/BasePresenter$2;

    invoke-direct {v1, p0, p1, p2}, Lcom/moji/mvpframe/BasePresenter$2;-><init>(Lcom/moji/mvpframe/BasePresenter;Lcom/moji/requestcore/entity/AbsBaseEntity;Z)V

    invoke-interface {v0, v1}, Lcom/moji/mvpframe/IMJMvpView;->hideLoading(Lcom/moji/mvpframe/delegate/ILoadingCallback;)V

    const/4 p1, 0x0

    return p1
.end method

.method private d()V
    .locals 2

    .line 31
    iget-object v0, p0, Lcom/moji/mvpframe/BasePresenter;->e:Ljava/lang/Object;

    if-eqz v0, :cond_0

    return-void

    .line 32
    :cond_0
    new-instance v0, Ljava/lang/IllegalStateException;

    const-string v1, "mApi can not be null,please init mApi in instanceApi method,if you don\'t want to use MJApi ,you can indicate a DefaultApi by default. if you have any question,call me. by GuDong"

    invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw v0
.end method


# virtual methods
.method public a(Lcom/moji/requestcore/MJException;)V
    .locals 0

    return-void
.end method

.method public a(Lcom/moji/requestcore/MJException;Z)V
    .locals 2

    .line 84
    iget-object v0, p0, Lcom/moji/mvpframe/BasePresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    new-instance v1, Lcom/moji/mvpframe/BasePresenter$1;

    invoke-direct {v1, p0, p1}, Lcom/moji/mvpframe/BasePresenter$1;-><init>(Lcom/moji/mvpframe/BasePresenter;Lcom/moji/requestcore/MJException;)V

    invoke-interface {v0, v1}, Lcom/moji/mvpframe/IMJMvpView;->hideLoading(Lcom/moji/mvpframe/delegate/ILoadingCallback;)V

    if-nez p2, :cond_0

    return-void

    :cond_0
    return-void
.end method

.method public a(Lcom/moji/requestcore/entity/AbsBaseEntity;Z)Z
    .locals 2

    .line 98
    new-instance v0, Lcom/moji/base/control/BaseControl;

    invoke-virtual {p0}, Lcom/moji/mvpframe/BasePresenter;->n()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/moji/base/control/BaseControl;-><init>(Landroid/content/Context;)V

    invoke-virtual {v0, p1}, Lcom/moji/base/control/BaseControl;->a(Lcom/moji/requestcore/entity/AbsBaseEntity;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 p1, 0x1

    return p1

    .line 101
    :cond_0
    invoke-direct {p0, p1, p2}, Lcom/moji/mvpframe/BasePresenter;->b(Lcom/moji/requestcore/entity/AbsBaseEntity;Z)Z

    const/4 p1, 0x0

    return p1
.end method

.method protected abstract b()Ljava/lang/Object;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "()TA;"
        }
    .end annotation
.end method

.method public c()V
    .locals 0

    return-void
.end method

.method public l_()V
    .locals 0

    return-void
.end method

.method public m()V
    .locals 0

    return-void
.end method

.method public m_()V
    .locals 0

    return-void
.end method

.method protected n()Landroid/content/Context;
    .locals 2

    .line 124
    iget-object v0, p0, Lcom/moji/mvpframe/BasePresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    if-eqz v0, :cond_0

    .line 125
    iget-object v0, p0, Lcom/moji/mvpframe/BasePresenter;->f:Lcom/moji/mvpframe/IMJMvpView;

    invoke-interface {v0}, Lcom/moji/mvpframe/IMJMvpView;->getMJContext()Landroid/content/Context;

    move-result-object v0

    return-object v0

    :cond_0
    const-string v0, "BasePresenter"

    const-string v1, "mView is null"

    .line 127
    invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V

    const/4 v0, 0x0

    return-object v0
.end method

.method public n_()V
    .locals 0

    return-void
.end method

.method public o_()V
    .locals 0

    return-void
.end method

.method public r_()V
    .locals 0

    return-void
.end method
