com.google.common.reflect.TypeToken.subtypeBound()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(6.2k)|赞(0)|评价(0)|浏览(103)

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

TypeToken.subtypeBound介绍

暂无

代码示例

代码示例来源:origin: com.google.guava/guava-jdk5

@Nullable private static Type subtypeBound(Type type) {
 if (type instanceof WildcardType) {
  return subtypeBound((WildcardType) type);
 } else {
  return type;
 }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@Nullable private static Type subtypeBound(Type type) {
 if (type instanceof WildcardType) {
  return subtypeBound((WildcardType) type);
 } else {
  return type;
 }
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@Nullable private static Type subtypeBound(Type type) {
 if (type instanceof WildcardType) {
  return subtypeBound((WildcardType) type);
 } else {
  return type;
 }
}

代码示例来源:origin: org.hudsonci.lib.guava/guava

@Nullable private static Type subtypeBound(Type type) {
 if (type instanceof WildcardType) {
  return subtypeBound((WildcardType) type);
 } else {
  return type;
 }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Nullable private static Type subtypeBound(Type type) {
 if (type instanceof WildcardType) {
  return subtypeBound((WildcardType) type);
 } else {
  return type;
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava

@Nullable private static Type subtypeBound(Type type) {
 if (type instanceof WildcardType) {
  return subtypeBound((WildcardType) type);
 } else {
  return type;
 }
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: Nextdoor/bender

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: com.google.guava/guava-jdk5

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: org.hudsonci.lib.guava/guava

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

private static boolean isAssignableBySubtypeBound(Type from, WildcardType to) {
 Type toSubtypeBound = subtypeBound(to);
 if (toSubtypeBound == null) {
  return true;
 }
 Type fromSubtypeBound = subtypeBound(from);
 if (fromSubtypeBound == null) {
  return false;
 }
 return isAssignable(toSubtypeBound, fromSubtypeBound);
}

代码示例来源:origin: Nextdoor/bender

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

代码示例来源:origin: com.google.guava/guava-jdk5

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

代码示例来源:origin: org.hudsonci.lib.guava/guava

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

@Nullable private static Type subtypeBound(WildcardType type) {
 Type[] lowerBounds = type.getLowerBounds();
 if (lowerBounds.length == 1) {
  return subtypeBound(lowerBounds[0]);
 } else if (lowerBounds.length == 0) {
  return null;
 } else {
  throw new AssertionError(
    "Wildcard should have at most one lower bound: " + type);
 }
}

相关文章

微信公众号

最新文章

更多

TypeToken类方法