本文整理汇总了Java中com.sun.tools.javac.tree.DCTree.DCDocComment类的典型用法代码示例。如果您正苦于以下问题:Java DCDocComment类的具体用法?Java DCDocComment怎么用?Java DCDocComment使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DCDocComment类属于com.sun.tools.javac.tree.DCTree包,在下文中一共展示了DCDocComment类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: parse
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
public DCDocComment parse() {
String c = comment.getText();
buf = new char[c.length() + 1];
c.getChars(0, c.length(), buf, 0);
buf[buf.length - 1] = EOI;
buflen = buf.length - 1;
bp = -1;
nextChar();
List<DCTree> body = blockContent();
List<DCTree> tags = blockTags();
int pos = !body.isEmpty()
? body.head.pos
: !tags.isEmpty() ? tags.head.pos : Position.NOPOS;
DCDocComment dc = m.at(pos).newDocCommentTree(comment, body, tags);
return dc;
}
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:19,代码来源:DocCommentParser.java
示例2: diffDocComment
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffDocComment(DCDocComment doc, DCDocComment oldT, DCDocComment newT, int[] elementBounds) {
tokenSequence.move(elementBounds[0]);
if (!tokenSequence.moveNext()) {
return elementBounds[1];
}
while (tokenSequence.token().id() == JavaTokenId.WHITESPACE && tokenSequence.moveNext()) {
// Skip whitespace
}
int localpointer = tokenSequence.offset() + 3; // copy the first characters of the javadoc comment /**;
// int localpointer = getOldPos((DCTree)oldT.getFirstSentence().head, doc);
copyTo(elementBounds[0], localpointer);
if(oldT.firstSentence.isEmpty() && !newT.firstSentence.isEmpty()) {
printer.newline();
printer.toLeftMargin();
printer.print(" * ");
}
localpointer = diffList(doc, oldT.firstSentence, newT.firstSentence, localpointer, Measure.TAGS);
localpointer = diffList(doc, oldT.body, newT.body, localpointer, Measure.TAGS);
if(oldT.tags.isEmpty()) {
int commentEnd = commentEnd(doc);
if(localpointer < commentEnd) {
copyTo(localpointer, localpointer = commentEnd);
}
}
localpointer = diffList(doc, oldT.tags, newT.tags, localpointer, Measure.TAGS);
// localpointer = endPos(oldT.tags, doc);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:32,代码来源:CasualDiff.java
示例3: diffParam
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffParam(DCDocComment doc, DCParam oldT, DCParam newT, int[] elementBounds) {
int localpointer;
if(oldT.isTypeParameter != newT.isTypeParameter) {
if(oldT.isTypeParameter) {
localpointer = getOldPos(oldT.name, doc);
copyTo(elementBounds[0], localpointer - 1);
} else {
localpointer = getOldPos(oldT.name, doc);
copyTo(elementBounds[0], localpointer);
printer.print("<");
}
} else {
localpointer = getOldPos(oldT.name, doc);
copyTo(elementBounds[0], localpointer);
}
int nameEnd = endPos(oldT.name, doc);
localpointer = diffDocTree(doc, oldT.name, newT.name, new int[] {localpointer, nameEnd});
if(localpointer < nameEnd) {
copyTo(localpointer, localpointer = nameEnd);
}
if(oldT.isTypeParameter) {
localpointer++;
}
if(newT.isTypeParameter) {
printer.print(">");
}
localpointer = diffList(doc, oldT.description, newT.description, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:33,代码来源:CasualDiff.java
示例4: diffReturn
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffReturn(DCDocComment doc, DCReturn oldT, DCReturn newT, int[] elementBounds) {
int localpointer = oldT.description.isEmpty()? elementBounds[1] : getOldPos(oldT.description.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.description, newT.description, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CasualDiff.java
示例5: diffIdentifier
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffIdentifier(DCDocComment doc, DCIdentifier oldT, DCIdentifier newT, int[] elementBounds) {
if(oldT.name.equals(newT.name)) {
copyTo(elementBounds[0], elementBounds[1]);
} else {
printer.print((Name) newT.name);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CasualDiff.java
示例6: diffLink
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffLink(DCDocComment doc, DCLink oldT, DCLink newT, int[] elementBounds) {
int localpointer = getOldPos(oldT.ref, doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffDocTree(doc, oldT.ref, newT.ref, new int[] {localpointer, endPos(oldT.ref, doc)});
localpointer = diffList(doc, oldT.label, newT.label, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CasualDiff.java
示例7: diffSee
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffSee(DCDocComment doc, DCSee oldT, DCSee newT, int[] elementBounds) {
int localpointer;
localpointer = getOldPos(oldT.reference.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.reference, newT.reference, localpointer, Measure.DOCTREE);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:CasualDiff.java
示例8: diffText
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的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];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CasualDiff.java
示例9: diffAuthor
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffAuthor(DCDocComment doc, DCAuthor oldT, DCAuthor newT, int[] elementBounds) {
int localpointer = oldT.name.isEmpty()? elementBounds[1] : getOldPos(oldT.name.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.name, newT.name, localpointer, Measure.DOCTREE);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CasualDiff.java
示例10: diffComment
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffComment(DCDocComment doc, DCComment oldT, DCComment newT, int[] elementBounds) {
if(oldT.body.equals(newT.body)) {
copyTo(elementBounds[0], elementBounds[1]);
} else {
printer.print(newT.body);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CasualDiff.java
示例11: diffDeprecated
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffDeprecated(DCDocComment doc, DCDeprecated oldT, DCDeprecated newT, int[] elementBounds) {
int localpointer = oldT.body.isEmpty()? elementBounds[1] : getOldPos(oldT.body.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.body, newT.body, localpointer, Measure.DOCTREE);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CasualDiff.java
示例12: diffEntity
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffEntity(DCDocComment doc, DCEntity oldT, DCEntity newT, int[] elementBounds) {
if(oldT.name.equals(newT.name)) {
copyTo(elementBounds[0], elementBounds[1]);
} else {
printer.print(newT);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CasualDiff.java
示例13: diffErroneous
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffErroneous(DCDocComment doc, DCErroneous oldT, DCErroneous newT, int[] elementBounds) {
if(oldT.body.equals(newT.body)) {
copyTo(elementBounds[0], elementBounds[1]);
} else {
printer.print(newT.body);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:9,代码来源:CasualDiff.java
示例14: diffThrows
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffThrows(DCDocComment doc, DCThrows oldT, DCThrows newT, int[] elementBounds) {
int localpointer;
localpointer = getOldPos(oldT.name, doc);
copyTo(elementBounds[0], localpointer);
int endPos = endPos(oldT.name, doc);
localpointer = diffDocTree(doc, oldT.name, newT.name, new int[] {localpointer, endPos});
if(localpointer < endPos) {
copyTo(localpointer, localpointer = endPos);
}
localpointer = diffList(doc, oldT.description, newT.description, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:CasualDiff.java
示例15: diffLiteral
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffLiteral(DCDocComment doc, DCLiteral oldT, DCLiteral newT, int[] elementBounds) {
int localpointer;
localpointer = getOldPos(oldT.body, doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffDocTree(doc, oldT.body, newT.body, new int[] {localpointer, endPos(oldT.body, doc)});
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:11,代码来源:CasualDiff.java
示例16: diffSerial
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffSerial(DCDocComment doc, DCSerial oldT, DCSerial newT, int[] elementBounds) {
int localpointer = getOldPos(oldT.description.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.description, newT.description, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CasualDiff.java
示例17: diffSerialData
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffSerialData(DCDocComment doc, DCSerialData oldT, DCSerialData newT, int[] elementBounds) {
int localpointer = getOldPos(oldT.description.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.description, newT.description, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CasualDiff.java
示例18: diffSerialField
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffSerialField(DCDocComment doc, DCSerialField oldT, DCSerialField newT, int[] elementBounds) {
int localpointer;
localpointer = getOldPos(oldT.name, doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffDocTree(doc, oldT.name, newT.name, new int[] {localpointer, endPos(oldT.name, doc)});
localpointer = diffDocTree(doc, oldT.type, newT.type, new int[] {localpointer, endPos(oldT.type, doc)});
localpointer = diffList(doc, oldT.description, newT.description, localpointer, Measure.TAGS);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:CasualDiff.java
示例19: diffSince
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffSince(DCDocComment doc, DCSince oldT, DCSince newT, int[] elementBounds) {
int localpointer = oldT.body.isEmpty()? elementBounds[1] : getOldPos(oldT.body.get(0), doc);
copyTo(elementBounds[0], localpointer);
localpointer = diffList(doc, oldT.body, newT.body, localpointer, Measure.DOCTREE);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:CasualDiff.java
示例20: diffStartElement
import com.sun.tools.javac.tree.DCTree.DCDocComment; //导入依赖的package包/类
private int diffStartElement(DCDocComment doc, DCStartElement oldT, DCStartElement newT, int[] elementBounds) {
int localpointer = oldT.attrs.isEmpty()? elementBounds[1] - 1 : getOldPos(oldT.attrs.get(0), doc);
if(oldT.name.equals(newT.name)) {
copyTo(elementBounds[0], localpointer);
} else {
printer.print("<");
printer.print((Name) newT.name);
}
localpointer = diffList(doc, oldT.attrs, newT.attrs, localpointer, Measure.DOCTREE);
if(localpointer < elementBounds[1]) {
copyTo(localpointer, elementBounds[1]);
}
return elementBounds[1];
}
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:CasualDiff.java
注:本文中的com.sun.tools.javac.tree.DCTree.DCDocComment类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论