okhttp3.internal.platform.Platform.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(197)

本文整理了Java中okhttp3.internal.platform.Platform.<init>()方法的一些代码示例,展示了Platform.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Platform.<init>()方法的具体详情如下:
包路径:okhttp3.internal.platform.Platform
类名称:Platform
方法名:<init>

Platform.<init>介绍

暂无

代码示例

代码示例来源:origin: square/okhttp

/** Attempt to match the host runtime to a capable Platform implementation. */
private static Platform findPlatform() {
 Platform android = AndroidPlatform.buildIfSupported();
 if (android != null) {
  return android;
 }
 if (isConscryptPreferred()) {
  Platform conscrypt = ConscryptPlatform.buildIfSupported();
  if (conscrypt != null) {
   return conscrypt;
  }
 }
 Platform jdk9 = Jdk9Platform.buildIfSupported();
 if (jdk9 != null) {
  return jdk9;
 }
 Platform jdkWithJettyBoot = Jdk8WithJettyBootPlatform.buildIfSupported();
 if (jdkWithJettyBoot != null) {
  return jdkWithJettyBoot;
 }
 // Probably an Oracle JDK like OpenJDK.
 return new Platform();
}

代码示例来源:origin: com.squareup.okhttp3/okhttp

/** Attempt to match the host runtime to a capable Platform implementation. */
private static Platform findPlatform() {
 Platform android = AndroidPlatform.buildIfSupported();
 if (android != null) {
  return android;
 }
 if (isConscryptPreferred()) {
  Platform conscrypt = ConscryptPlatform.buildIfSupported();
  if (conscrypt != null) {
   return conscrypt;
  }
 }
 Platform jdk9 = Jdk9Platform.buildIfSupported();
 if (jdk9 != null) {
  return jdk9;
 }
 Platform jdkWithJettyBoot = Jdk8WithJettyBootPlatform.buildIfSupported();
 if (jdkWithJettyBoot != null) {
  return jdkWithJettyBoot;
 }
 // Probably an Oracle JDK like OpenJDK.
 return new Platform();
}

代码示例来源:origin: stackoverflow.com

Platform android = new Platform(....);
Platform windows = new Platform(....);
Map<String, Platform> map = new HashMap<String, Platform>();
map.put("android", android);
map.put("windows", windows);

//for retrieval
map.get("android");

代码示例来源:origin: com.github.ljun20160606/okhttp

/** Attempt to match the host runtime to a capable Platform implementation. */
private static Platform findPlatform() {
 Platform android = AndroidPlatform.buildIfSupported();
 if (android != null) {
  return android;
 }
 Platform jdk9 = Jdk9Platform.buildIfSupported();
 if (jdk9 != null) {
  return jdk9;
 }
 Platform jdkWithJettyBoot = JdkWithJettyBootPlatform.buildIfSupported();
 if (jdkWithJettyBoot != null) {
  return jdkWithJettyBoot;
 }
 // Probably an Oracle JDK like OpenJDK.
 return new Platform();
}

代码示例来源:origin: apache/servicemix-bundles

/** Attempt to match the host runtime to a capable Platform implementation. */
private static Platform findPlatform() {
 Platform android = AndroidPlatform.buildIfSupported();
 if (android != null) {
  return android;
 }
 if (isConscryptPreferred()) {
  Platform conscrypt = ConscryptPlatform.buildIfSupported();
  if (conscrypt != null) {
   return conscrypt;
  }
 }
 Platform jdk9 = Jdk9Platform.buildIfSupported();
 if (jdk9 != null) {
  return jdk9;
 }
 Platform jdkWithJettyBoot = JdkWithJettyBootPlatform.buildIfSupported();
 if (jdkWithJettyBoot != null) {
  return jdkWithJettyBoot;
 }
 // Probably an Oracle JDK like OpenJDK.
 return new Platform();
}

代码示例来源:origin: stackoverflow.com

Platform platform = new Platform();
platform.setY(Window.getClientHeight());
return platform;

相关文章