Platform.smali
.class abstract Lretrofit/Platform;
.super Ljava/lang/Object;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lretrofit/Platform$OkClientInstantiator;,
Lretrofit/Platform$AppEngine;,
Lretrofit/Platform$Android;,
Lretrofit/Platform$Base;
}
.end annotation
# static fields
.field static final HAS_RX_JAVA:Z
.field private static final PLATFORM:Lretrofit/Platform;
# direct methods
.method static constructor <clinit>()V
.registers 1
invoke-static {}, Lretrofit/Platform;->findPlatform()Lretrofit/Platform;
move-result-object v0
sput-object v0, Lretrofit/Platform;->PLATFORM:Lretrofit/Platform;
invoke-static {}, Lretrofit/Platform;->hasRxJavaOnClasspath()Z
move-result v0
sput-boolean v0, Lretrofit/Platform;->HAS_RX_JAVA:Z
return-void
.end method
.method constructor <init>()V
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method static synthetic access$300()Z
.registers 1
invoke-static {}, Lretrofit/Platform;->hasOkHttpOnClasspath()Z
move-result v0
return v0
.end method
.method private static findPlatform()Lretrofit/Platform;
.registers 2
const/4 v0, 0x0
:try_start_1
const-string v1, "android.os.Build"
invoke-static {v1}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
sget v1, Landroid/os/Build$VERSION;->SDK_INT:I
if-eqz v1, :cond_11
new-instance v1, Lretrofit/Platform$Android;
invoke-direct {v1, v0}, Lretrofit/Platform$Android;-><init>(Lretrofit/Platform$1;)V
:try_end_f
.catch Ljava/lang/ClassNotFoundException; {:try_start_1 .. :try_end_f} :catch_10
return-object v1
:catch_10
nop
:cond_11
const-string v1, "com.google.appengine.runtime.version"
invoke-static {v1}, Ljava/lang/System;->getProperty(Ljava/lang/String;)Ljava/lang/String;
move-result-object v1
if-eqz v1, :cond_1f
new-instance v1, Lretrofit/Platform$AppEngine;
invoke-direct {v1, v0}, Lretrofit/Platform$AppEngine;-><init>(Lretrofit/Platform$1;)V
return-object v1
:cond_1f
new-instance v1, Lretrofit/Platform$Base;
invoke-direct {v1, v0}, Lretrofit/Platform$Base;-><init>(Lretrofit/Platform$1;)V
return-object v1
.end method
.method static get()Lretrofit/Platform;
.registers 1
sget-object v0, Lretrofit/Platform;->PLATFORM:Lretrofit/Platform;
return-object v0
.end method
.method private static hasOkHttpOnClasspath()Z
.registers 1
:try_start_0
const-string v0, "com.squareup.okhttp.OkHttpClient"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
:try_end_5
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_5} :catch_7
const/4 v0, 0x1
return v0
:catch_7
const/4 v0, 0x0
return v0
.end method
.method private static hasRxJavaOnClasspath()Z
.registers 1
:try_start_0
const-string v0, "rx.Observable"
invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;
:try_end_5
.catch Ljava/lang/ClassNotFoundException; {:try_start_0 .. :try_end_5} :catch_7
const/4 v0, 0x1
return v0
:catch_7
const/4 v0, 0x0
return v0
.end method
# virtual methods
.method abstract defaultCallbackExecutor()Ljava/util/concurrent/Executor;
.end method
.method abstract defaultClient()Lretrofit/client/Client$Provider;
.end method
.method abstract defaultConverter()Lretrofit/converter/Converter;
.end method
.method abstract defaultHttpExecutor()Ljava/util/concurrent/Executor;
.end method
.method abstract defaultLog()Lretrofit/RestAdapter$Log;
.end method