本文整理汇总了Java中com.sun.tools.javac.code.BoundKind.UNBOUND属性的典型用法代码示例。如果您正苦于以下问题:Java BoundKind.UNBOUND属性的具体用法?Java BoundKind.UNBOUND怎么用?Java BoundKind.UNBOUND使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.tools.javac.code.BoundKind
的用法示例。
在下文中一共展示了BoundKind.UNBOUND属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Wildcard
public WildcardTree Wildcard(Kind kind, Tree type) {
final BoundKind boundKind;
switch (kind) {
case UNBOUNDED_WILDCARD:
boundKind = BoundKind.UNBOUND;
break;
case EXTENDS_WILDCARD:
boundKind = BoundKind.EXTENDS;
break;
case SUPER_WILDCARD:
boundKind = BoundKind.SUPER;
break;
default:
throw new IllegalArgumentException("Unknown wildcard bound " + kind);
}
TypeBoundKind tbk = make.at(NOPOS).TypeBoundKind(boundKind);
return make.at(NOPOS).Wildcard(tbk, (JCExpression)type);
}
示例2: visitWildcard
@Override
public void visitWildcard(JCWildcard tree) {
if (tree.kind.kind == BoundKind.UNBOUND)
result = tree.kind.toString();
else
result = tree.kind + " " + print(tree.inner);
}
示例3: visitWildcardType
@Override
public String visitWildcardType(Type.WildcardType t, Void aVoid) {
StringBuilder sb = new StringBuilder();
sb.append(t.kind);
if (t.kind != BoundKind.UNBOUND) {
sb.append(t.type.accept(this, null));
}
return sb.toString();
}
示例4: visitWildcard
@Override
public void visitWildcard(JCWildcard tree) {
try {
print(tree.kind);
if (tree.kind.kind != BoundKind.UNBOUND)
printExpr(tree.inner);
} catch (IOException e) {
throw new UncheckedIOException(e);
}
}
示例5: visitWildcard
public void visitWildcard(JCWildcard tree) {
//- System.err.println("visitWildcard("+tree+");");//DEBUG
Type type = (tree.kind.kind == BoundKind.UNBOUND)
? syms.objectType
: attribType(tree.inner, env);
result = check(tree, new WildcardType(chk.checkRefType(tree.pos(), type),
tree.kind.kind,
syms.boundClass),
TYP, pkind, pt);
}