本文整理了Java中com.sun.tools.javac.code.Types.classBound()
方法的一些代码示例,展示了Types.classBound()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Types.classBound()
方法的具体详情如下:
包路径:com.sun.tools.javac.code.Types
类名称:Types
方法名:classBound
[英]If the given type is a (possibly selected) type variable, return the bounding class of this type, otherwise return the type itself.
[中]如果给定的类型是(可能是选定的)类型变量,则返回该类型的边界类,否则返回类型本身。
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
@Override
public Type visitTypeVar(TypeVar t, Void ignored) {
return classBound(supertype(t));
}
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
@Override
public Type visitTypeVar(TypeVar t, Void ignored) {
return classBound(supertype(t));
}
代码示例来源:origin: sc.fiji/javac
@Override
public Type visitTypeVar(TypeVar t, Void ignored) {
return classBound(supertype(t));
}
代码示例来源:origin: konsoletyper/teavm-javac
@Override
public Type visitTypeVar(TypeVar t, Void ignored) {
return classBound(supertype(t));
}
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
Type outer1 = classBound(t.getEnclosingType());
if (outer1 != t.getEnclosingType())
return new ClassType(outer1, t.getTypeArguments(), t.tsym);
else
return t;
}
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
Type outer1 = classBound(t.getEnclosingType());
if (outer1 != t.getEnclosingType())
return new ClassType(outer1, t.getTypeArguments(), t.tsym);
else
return t;
}
代码示例来源:origin: sc.fiji/javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
Type outer1 = classBound(t.getEnclosingType());
if (outer1 != t.getEnclosingType())
return new ClassType(outer1, t.getTypeArguments(), t.tsym);
else
return t;
}
代码示例来源:origin: konsoletyper/teavm-javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
Type outer1 = classBound(t.getEnclosingType());
if (outer1 != t.getEnclosingType())
return new ClassType(outer1, t.getTypeArguments(), t.tsym);
else
return t;
}
代码示例来源:origin: org.kohsuke.sorcerer/sorcerer-javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
if (t.supertype_field == null) {
Type supertype = ((ClassSymbol)t.tsym).getSuperclass();
// An interface has no superclass; its supertype is Object.
if (t.isInterface())
supertype = ((ClassType)t.tsym.type).supertype_field;
if (t.supertype_field == null) {
List<Type> actuals = classBound(t).allparams();
List<Type> formals = t.tsym.type.allparams();
if (t.hasErasedSupertypes()) {
t.supertype_field = erasureRecursive(supertype);
} else if (formals.nonEmpty()) {
t.supertype_field = subst(supertype, formals, actuals);
}
else {
t.supertype_field = supertype;
}
}
}
return t.supertype_field;
}
代码示例来源:origin: konsoletyper/teavm-javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
if (t.supertype_field == null) {
Type supertype = ((ClassSymbol)t.tsym).getSuperclass();
// An interface has no superclass; its supertype is Object.
if (t.isInterface())
supertype = ((ClassType)t.tsym.type).supertype_field;
if (t.supertype_field == null) {
List<Type> actuals = classBound(t).allparams();
List<Type> formals = t.tsym.type.allparams();
if (t.hasErasedSupertypes()) {
t.supertype_field = erasureRecursive(supertype);
} else if (formals.nonEmpty()) {
t.supertype_field = subst(supertype, formals, actuals);
}
else {
t.supertype_field = supertype;
}
}
}
return t.supertype_field;
}
代码示例来源:origin: org.jvnet.sorcerer/sorcerer-javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
if (t.supertype_field == null) {
Type supertype = ((ClassSymbol)t.tsym).getSuperclass();
// An interface has no superclass; its supertype is Object.
if (t.isInterface())
supertype = ((ClassType)t.tsym.type).supertype_field;
if (t.supertype_field == null) {
List<Type> actuals = classBound(t).allparams();
List<Type> formals = t.tsym.type.allparams();
if (actuals.isEmpty()) {
if (formals.isEmpty())
// Should not happen. See comments below in interfaces
t.supertype_field = supertype;
else
t.supertype_field = erasure(supertype);
} else {
t.supertype_field = subst(supertype, formals, actuals);
}
}
}
return t.supertype_field;
}
代码示例来源:origin: sc.fiji/javac
@Override
public Type visitClassType(ClassType t, Void ignored) {
if (t.supertype_field == null) {
Type supertype = ((ClassSymbol)t.tsym).getSuperclass();
// An interface has no superclass; its supertype is Object.
if (t.isInterface())
supertype = ((ClassType)t.tsym.type).supertype_field;
if (t.supertype_field == null) {
List<Type> actuals = classBound(t).allparams();
List<Type> formals = t.tsym.type.allparams();
if (actuals.isEmpty()) {
if (formals.isEmpty())
// Should not happen. See comments below in interfaces
t.supertype_field = supertype;
else
t.supertype_field = erasure(supertype);
} else {
t.supertype_field = subst(supertype, formals, actuals);
}
}
}
return t.supertype_field;
}
内容来源于网络,如有侵权,请联系作者删除!