本文整理汇总了Java中com.sun.tools.javac.tree.DCTree.DCText类的典型用法代码示例。如果您正苦于以下问题:Java DCText类的具体用法?Java DCText怎么用?Java DCText使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DCText类属于com.sun.tools.javac.tree.DCTree包,在下文中一共展示了DCText类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: diffText
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
private int diffText(DCDocComment doc, DCText oldT, DCText newT, int[] elementBounds) {
if(oldT.text.equals(newT.text)) {
copyTo(elementBounds[0], elementBounds[1]);
} else {
printer.print(newT.text);
}
return elementBounds[1];
}
示例2: quotedString
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
/**
* Read a quoted string.
* It is an error if the beginning of the next tag is detected.
*/
@SuppressWarnings("fallthrough")
protected DCText quotedString() {
int pos = bp;
nextChar();
loop:
while (bp < buflen) {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
break;
case ' ': case '\t':
break;
case '"':
nextChar();
// trim trailing white-space?
return m.at(pos).Text(newString(pos, bp));
case '@':
if (newline)
break loop;
}
nextChar();
}
return null;
}
示例3: quotedString
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
/**
* Read a quoted string.
* It is an error if the beginning of the next tag is detected.
*/
@SuppressWarnings("fallthrough")
protected DCText quotedString() {
int pos = bp;
nextChar();
loop:
while (bp < buflen) {
switch (ch) {
case '\n': case '\r': case '\f':
newline = true;
break;
case ' ': case '\t':
break;
case '"':
nextChar();
// trim trailing white-space?
return m.at(pos).newTextTree(newString(pos, bp));
case '@':
if (newline)
break loop;
}
nextChar();
}
return null;
}
示例4: inlineWord
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
/**
* Read a term ie. one word.
* It is an error if the beginning of the next tag is detected.
*/
@SuppressWarnings("fallthrough")
protected DCText inlineWord() {
int pos = bp;
int depth = 0;
loop:
while (bp < buflen) {
switch (ch) {
case '\n':
newline = true;
// fallthrough
case '\r': case '\f': case ' ': case '\t':
return m.at(pos).newTextTree(newString(pos, bp));
case '@':
if (newline)
break loop;
case '{':
depth++;
break;
case '}':
if (depth == 0 || --depth == 0)
return m.at(pos).newTextTree(newString(pos, bp));
break;
}
newline = false;
nextChar();
}
return null;
}
示例5: newCodeTree
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public DCLiteral newCodeTree(TextTree text) {
DCLiteral tree = new DCLiteral(Kind.CODE, (DCText) text);
tree.pos = pos;
return tree;
}
示例6: newLiteralTree
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public DCLiteral newLiteralTree(TextTree text) {
DCLiteral tree = new DCLiteral(Kind.LITERAL, (DCText) text);
tree.pos = pos;
return tree;
}
示例7: newTextTree
import com.sun.tools.javac.tree.DCTree.DCText; //导入依赖的package包/类
@Override @DefinedBy(Api.COMPILER_TREE)
public DCText newTextTree(String text) {
DCText tree = new DCText(text);
tree.pos = pos;
return tree;
}