本文整理了Java中com.sun.tools.javac.code.Types.disjointType()
方法的一些代码示例,展示了Types.disjointType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.disjointType()
方法的具体详情如下:
包路径:com.sun.tools.javac.code.Types
类名称:Types
方法名:disjointType
[英]Two types or wildcards are considered disjoint if it can be proven that no type can be contained in both. It is conservative in that it is allowed to say that two types are not disjoint, even though they actually are. The type C is castable to C exactly if X and Y are not disjoint.
[中]如果可以证明两种类型或通配符中都不能包含任何类型,则认为这两种类型或通配符是不相交的。保守的说法是,允许说两种类型不是不相交的,即使它们实际上是不相交的。如果X和Y不是不相交的,C型完全可以铸造成C型。
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
public boolean disjointTypes(List<Type> ts, List<Type> ss) {
while (ts.tail != null && ss.tail != null) {
if (disjointType(ts.head, ss.head)) return true;
ts = ts.tail;
ss = ss.tail;
}
return false;
}
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
public boolean disjointTypes(List<Type> ts, List<Type> ss) {
while (ts.tail != null && ss.tail != null) {
if (disjointType(ts.head, ss.head)) return true;
ts = ts.tail;
ss = ss.tail;
}
return false;
}
代码示例来源:origin: sc.fiji/javac
public boolean disjointTypes(List<Type> ts, List<Type> ss) {
while (ts.tail != null && ss.tail != null) {
if (disjointType(ts.head, ss.head)) return true;
ts = ts.tail;
ss = ss.tail;
}
return false;
}
代码示例来源:origin: konsoletyper/teavm-javac
public boolean disjointTypes(List<Type> ts, List<Type> ss) {
while (ts.tail != null && ss.tail != null) {
if (disjointType(ts.head, ss.head)) return true;
ts = ts.tail;
ss = ss.tail;
}
return false;
}
内容来源于网络,如有侵权,请联系作者删除!