本文整理了Java中com.squareup.javapoet.ClassName.emitAnnotations()
方法的一些代码示例,展示了ClassName.emitAnnotations()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ClassName.emitAnnotations()
方法的具体详情如下:
包路径:com.squareup.javapoet.ClassName
类名称:ClassName
方法名:emitAnnotations
暂无
代码示例来源:origin: square/javapoet
className.emitAnnotations(out);
代码示例来源:origin: io.virtdata/virtdata-lib-realer
@Override CodeWriter emit(CodeWriter out) throws IOException {
if (enclosingType != null) {
enclosingType.emitAnnotations(out);
enclosingType.emit(out);
out.emit("." + rawType.simpleName());
} else {
rawType.emitAnnotations(out);
rawType.emit(out);
}
if (!typeArguments.isEmpty()) {
out.emitAndIndent("<");
boolean firstParameter = true;
for (TypeName parameter : typeArguments) {
if (!firstParameter) out.emitAndIndent(", ");
parameter.emitAnnotations(out);
parameter.emit(out);
firstParameter = false;
}
out.emitAndIndent(">");
}
return out;
}
代码示例来源:origin: xiaoxiangyeyuHeaven/JD-shopping-mall
@Override CodeWriter emit(CodeWriter out) throws IOException {
if (enclosingType != null) {
enclosingType.emitAnnotations(out);
enclosingType.emit(out);
out.emit("." + rawType.simpleName());
} else {
rawType.emitAnnotations(out);
rawType.emit(out);
}
if (!typeArguments.isEmpty()) {
out.emitAndIndent("<");
boolean firstParameter = true;
for (TypeName parameter : typeArguments) {
if (!firstParameter) out.emitAndIndent(", ");
parameter.emitAnnotations(out);
parameter.emit(out);
firstParameter = false;
}
out.emitAndIndent(">");
}
return out;
}
内容来源于网络,如有侵权,请联系作者删除!