本文整理汇总了Java中com.sun.tools.classfile.Type.TypeParamType类的典型用法代码示例。如果您正苦于以下问题:Java TypeParamType类的具体用法?Java TypeParamType怎么用?Java TypeParamType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TypeParamType类属于com.sun.tools.classfile.Type包,在下文中一共展示了TypeParamType类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitTypeParamType
import com.sun.tools.classfile.Type.TypeParamType; //导入依赖的package包/类
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
sb.append(type.name);
String sep = " extends ";
if (type.classBound != null
&& (options.verbose || !type.classBound.isObject())) {
sb.append(sep);
append(sb, type.classBound);
sep = " & ";
}
if (type.interfaceBounds != null) {
for (Type bound: type.interfaceBounds) {
sb.append(sep);
append(sb, bound);
sep = " & ";
}
}
return sb;
}
示例2: visitTypeParamType
import com.sun.tools.classfile.Type.TypeParamType; //导入依赖的package包/类
@Override
public StringBuilder visitTypeParamType(TypeParamType type, StringBuilder sb) {
sb.append(type.name);
String sep = " extends ";
if (type.classBound != null
&& (options.verbose || !type.classBound.isObject())) {
sb.append(sep);
append(sb, type.classBound);
sep = " & ";
}
if (type.interfaceBounds != null) {
for (Type bound: type.interfaceBounds) {
sb.append(sep);
append(sb, bound);
sep = " & ";
}
}
return sb;
}
示例3: visitTypeParamType
import com.sun.tools.classfile.Type.TypeParamType; //导入依赖的package包/类
public String visitTypeParamType(TypeParamType type, Void p) {
StringBuilder sb = new StringBuilder();
sb.append("TA{");
sb.append(type.name);
if (type.classBound != null) {
sb.append(":c");
sb.append(print(type.classBound));
}
if (type.interfaceBounds != null)
sb.append(print(":i", type.interfaceBounds, ""));
sb.append("}");
return sb.toString();
}
示例4: printTypeArgs
import com.sun.tools.classfile.Type.TypeParamType; //导入依赖的package包/类
String printTypeArgs(List<? extends TypeParamType> typeParamTypes) {
StringBuilder builder = new StringBuilder();
appendIfNotEmpty(builder, "<", typeParamTypes, "> ");
return builder.toString();
}
示例5: visitTypeParamType
import com.sun.tools.classfile.Type.TypeParamType; //导入依赖的package包/类
public Void visitTypeParamType(TypeParamType type, Void p) {
findDependencies(type.classBound);
findDependencies(type.interfaceBounds);
return null;
}