本文整理汇总了Java中com.sun.tools.doclets.internal.toolkit.Content.write方法的典型用法代码示例。如果您正苦于以下问题:Java Content.write方法的具体用法?Java Content.write怎么用?Java Content.write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.doclets.internal.toolkit.Content
的用法示例。
在下文中一共展示了Content.write方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: write
import com.sun.tools.doclets.internal.toolkit.Content; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
if (!isInline() && !atNewline)
out.write(DocletConstants.NL);
String tagString = htmlTag.toString();
out.write("<");
out.write(tagString);
Iterator<HtmlAttr> iterator = attrs.keySet().iterator();
HtmlAttr key;
String value;
while (iterator.hasNext()) {
key = iterator.next();
value = attrs.get(key);
out.write(" ");
out.write(key.toString());
if (!value.isEmpty()) {
out.write("=\"");
out.write(value);
out.write("\"");
}
}
out.write(">");
boolean nl = false;
for (Content c : content)
nl = c.write(out, nl);
if (htmlTag.endTagRequired()) {
out.write("</");
out.write(tagString);
out.write(">");
}
if (!isInline()) {
out.write(DocletConstants.NL);
return true;
} else {
return false;
}
}
示例2: write
import com.sun.tools.doclets.internal.toolkit.Content; //导入方法依赖的package包/类
@Override
public boolean write(Writer writer, boolean atNewline) throws IOException {
for (Content content: contents) {
atNewline = content.write(writer, atNewline);
}
return atNewline;
}
示例3: write
import com.sun.tools.doclets.internal.toolkit.Content; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
public boolean write(Writer out, boolean atNewline) throws IOException {
for (Content c : docContent)
atNewline = c.write(out, atNewline);
return atNewline;
}