本文整理了Java中com.google.common.reflect.TypeToken.supertypeBound()
方法的一些代码示例,展示了TypeToken.supertypeBound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TypeToken.supertypeBound()
方法的具体详情如下:
包路径:com.google.common.reflect.TypeToken
类名称:TypeToken
方法名:supertypeBound
暂无
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: Nextdoor/bender
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: com.google.guava/guava-jdk5
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private static Type supertypeBound(Type type) {
if (type instanceof WildcardType) {
return supertypeBound((WildcardType) type);
}
return type;
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: Nextdoor/bender
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: com.google.guava/guava-jdk5
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private static Type supertypeBound(WildcardType type) {
Type[] upperBounds = type.getUpperBounds();
if (upperBounds.length == 1) {
return supertypeBound(upperBounds[0]);
} else if (upperBounds.length == 0) {
return Object.class;
} else {
throw new AssertionError(
"There should be at most one upper bound for wildcard type: " + type);
}
}
代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby
private static boolean isAssignableToWildcardType(
Type from, WildcardType to) {
// if "to" is <? extends Foo>, "from" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
// if "to" is <? super Foo>, "from" can be:
// Foo, SuperFoo, <? super Foo> or <? super SuperFoo>.
return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to);
}
代码示例来源:origin: org.hudsonci.lib.guava/guava
private static boolean isAssignableToWildcardType(
Type from, WildcardType to) {
// if "to" is <? extends Foo>, "from" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
// if "to" is <? super Foo>, "from" can be:
// Foo, SuperFoo, <? super Foo> or <? super SuperFoo>.
return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby
private static boolean isAssignableToWildcardType(
Type from, WildcardType to) {
// if "to" is <? extends Foo>, "from" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
// if "to" is <? super Foo>, "from" can be:
// Foo, SuperFoo, <? super Foo> or <? super SuperFoo>.
return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to);
}
代码示例来源:origin: com.google.guava/guava-jdk5
private static boolean isAssignableToWildcardType(
Type from, WildcardType to) {
// if "to" is <? extends Foo>, "from" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
// if "to" is <? super Foo>, "from" can be:
// Foo, SuperFoo, <? super Foo> or <? super SuperFoo>.
return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to);
}
代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-analytics
private static boolean isAssignableToWildcardType(
Type from, WildcardType to) {
// if "to" is <? extends Foo>, "from" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
// if "to" is <? super Foo>, "from" can be:
// Foo, SuperFoo, <? super Foo> or <? super SuperFoo>.
return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to);
}
代码示例来源:origin: at.bestsolution.efxclipse.eclipse/com.google.guava
private static boolean isAssignableToWildcardType(
Type from, WildcardType to) {
// if "to" is <? extends Foo>, "from" can be:
// Foo, SubFoo, <? extends Foo>, <? extends SubFoo>, <T extends Foo> or
// <T extends SubFoo>.
// if "to" is <? super Foo>, "from" can be:
// Foo, SuperFoo, <? super Foo> or <? super SuperFoo>.
return isAssignable(from, supertypeBound(to)) && isAssignableBySubtypeBound(from, to);
}
内容来源于网络,如有侵权,请联系作者删除!