You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
192 lines
4.8 KiB
192 lines
4.8 KiB
.class public Lcom/google/common/reflect/ClassPath$ResourceInfo; |
|
.super Ljava/lang/Object; |
|
.source "ClassPath.java" |
|
|
|
|
|
# annotations |
|
.annotation build Lcom/google/common/annotations/Beta; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass; |
|
value = Lcom/google/common/reflect/ClassPath; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x9 |
|
name = "ResourceInfo" |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field final loader:Ljava/lang/ClassLoader; |
|
|
|
.field private final resourceName:Ljava/lang/String; |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Ljava/lang/String;Ljava/lang/ClassLoader;)V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 166 |
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V |
|
|
|
.line 167 |
|
invoke-static {p1}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/String; |
|
|
|
iput-object v0, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
.line 168 |
|
invoke-static {p2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/lang/ClassLoader; |
|
|
|
iput-object v0, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->loader:Ljava/lang/ClassLoader; |
|
|
|
.line 169 |
|
return-void |
|
.end method |
|
|
|
.method static of(Ljava/lang/String;Ljava/lang/ClassLoader;)Lcom/google/common/reflect/ClassPath$ResourceInfo; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 159 |
|
const-string v0, ".class" |
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->endsWith(Ljava/lang/String;)Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 160 |
|
new-instance v0, Lcom/google/common/reflect/ClassPath$ClassInfo; |
|
|
|
invoke-direct {v0, p0, p1}, Lcom/google/common/reflect/ClassPath$ClassInfo;-><init>(Ljava/lang/String;Ljava/lang/ClassLoader;)V |
|
|
|
.line 162 |
|
:goto_0 |
|
return-object v0 |
|
|
|
:cond_0 |
|
new-instance v0, Lcom/google/common/reflect/ClassPath$ResourceInfo; |
|
|
|
invoke-direct {v0, p0, p1}, Lcom/google/common/reflect/ClassPath$ResourceInfo;-><init>(Ljava/lang/String;Ljava/lang/ClassLoader;)V |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public equals(Ljava/lang/Object;)Z |
|
.locals 3 |
|
|
|
.prologue |
|
const/4 v0, 0x0 |
|
|
|
.line 187 |
|
instance-of v1, p1, Lcom/google/common/reflect/ClassPath$ResourceInfo; |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 188 |
|
check-cast p1, Lcom/google/common/reflect/ClassPath$ResourceInfo; |
|
|
|
.line 189 |
|
iget-object v1, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
iget-object v2, p1, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
iget-object v1, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->loader:Ljava/lang/ClassLoader; |
|
|
|
iget-object v2, p1, Lcom/google/common/reflect/ClassPath$ResourceInfo;->loader:Ljava/lang/ClassLoader; |
|
|
|
if-ne v1, v2, :cond_0 |
|
|
|
const/4 v0, 0x1 |
|
|
|
.line 192 |
|
:cond_0 |
|
return v0 |
|
.end method |
|
|
|
.method public final getResourceName()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 179 |
|
iget-object v0, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public hashCode()I |
|
.locals 1 |
|
|
|
.prologue |
|
.line 183 |
|
iget-object v0, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->hashCode()I |
|
|
|
move-result v0 |
|
|
|
return v0 |
|
.end method |
|
|
|
.method public toString()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 197 |
|
iget-object v0, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public final url()Ljava/net/URL; |
|
.locals 5 |
|
|
|
.prologue |
|
.line 173 |
|
iget-object v0, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->loader:Ljava/lang/ClassLoader; |
|
|
|
iget-object v1, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/ClassLoader;->getResource(Ljava/lang/String;)Ljava/net/URL; |
|
|
|
move-result-object v0 |
|
|
|
const-string v1, "Failed to load resource: %s" |
|
|
|
const/4 v2, 0x1 |
|
|
|
new-array v2, v2, [Ljava/lang/Object; |
|
|
|
const/4 v3, 0x0 |
|
|
|
iget-object v4, p0, Lcom/google/common/reflect/ClassPath$ResourceInfo;->resourceName:Ljava/lang/String; |
|
|
|
aput-object v4, v2, v3 |
|
|
|
invoke-static {v0, v1, v2}, Lcom/google/common/base/Preconditions;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Ljava/net/URL; |
|
|
|
return-object v0 |
|
.end method
|
|
|