正在查看: Hopscotch v9.7.2 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Hopscotch v9.7.2 应用的 f.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package io.ktor.client;
import io.ktor.client.engine.i;
import java.util.List;
import java.util.ServiceLoader;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.Job;
import org.jetbrains.annotations.NotNull;
public final class f {
@NotNull
private static final i<?> FACTORY;
@NotNull
private static final List<e> engines;
static {
ServiceLoader load = ServiceLoader.load(e.class, e.class.getClassLoader());
Intrinsics.checkNotNullExpressionValue(load, "load(it, it.classLoader)");
List<e> X = CollectionsKt.X(load);
engines = X;
e eVar = (e) CollectionsKt.firstOrNull(X);
i<?> a = eVar == null ? null : eVar.a();
if (a == null) {
throw new IllegalStateException("Failed to find HTTP client engine implementation in the classpath: consider adding client engine dependency. See https://ktor.io/clients/http-client/engines.html".toString());
}
FACTORY = a;
}
@NotNull
public static final a a(@NotNull Function1<? super b<?>, Unit> block) {
Intrinsics.checkNotNullParameter(block, "block");
i<?> engineFactory = FACTORY;
Intrinsics.checkNotNullParameter(engineFactory, "engineFactory");
Intrinsics.checkNotNullParameter(block, "block");
b bVar = new b();
block.invoke(bVar);
io.ktor.client.engine.a a = engineFactory.a(bVar.c());
a aVar = new a(a, bVar, true);
CoroutineContext.Element element = aVar.getCoroutineContext().get(Job.Key);
Intrinsics.checkNotNull(element);
((Job) element).invokeOnCompletion(new g(a));
return aVar;
}
}