本文整理了Java中com.sun.tools.javac.code.Types.substBound()
方法的一些代码示例,展示了Types.substBound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.substBound()
方法的具体详情如下:
包路径:com.sun.tools.javac.code.Types
类名称:Types
方法名:substBound
暂无
代码示例来源:origin: org.netbeans.api/org-netbeans-modules-java-source-base
public static boolean checkTypesAssignable(CompilationInfo info, TypeMirror from, TypeMirror to) {
Context c = ((JavacTaskImpl) info.impl.getJavacTask()).getContext();
if (from.getKind() == TypeKind.TYPEVAR) {
Types types = Types.instance(c);
TypeVar t = types.substBound((TypeVar)from, com.sun.tools.javac.util.List.of((Type)from), com.sun.tools.javac.util.List.of(types.boxedTypeOrType((Type)to)));
return info.getTypes().isAssignable(t.getUpperBound(), to)
|| info.getTypes().isAssignable(to, t.getUpperBound());
}
if (from.getKind() == TypeKind.WILDCARD) {
from = Types.instance(c).wildUpperBound((Type)from);
}
return Check.instance(c).checkType(null, (Type)from, (Type)to).getKind() != TypeKind.ERROR;
}
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
if (tvars.tail.isEmpty())
return List.<Type>of(substBound((TypeVar)tvars.head, from, to));
ListBuffer<Type> newBoundsBuf = lb();
boolean changed = false;
代码示例来源:origin: sc.fiji/javac
if (tvars.tail.isEmpty())
return List.<Type>of(substBound((TypeVar)tvars.head, from, to));
ListBuffer<Type> newBoundsBuf = lb();
boolean changed = false;
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
tvars_buf.append(types.substBound(((TypeVar)forms.head),
formals,
Type.removeBounds(actuals)));
代码示例来源:origin: sc.fiji/javac
tvars_buf.append(types.substBound(((TypeVar)forms.head),
formals,
Type.removeBounds(actuals)));
内容来源于网络,如有侵权,请联系作者删除!