本文整理汇总了Java中com.sun.tools.javac.parser.Tokens.Comment.CommentStyle.JAVADOC属性的典型用法代码示例。如果您正苦于以下问题:Java CommentStyle.JAVADOC属性的具体用法?Java CommentStyle.JAVADOC怎么用?Java CommentStyle.JAVADOC使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.sun.tools.javac.parser.Tokens.Comment.CommentStyle
的用法示例。
在下文中一共展示了CommentStyle.JAVADOC属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getText
@Override
public String getText() {
if (!scanned && cs == CommentStyle.JAVADOC) {
scanDocComment();
}
return docComment;
}
示例2: newDocCommentTree
@Override @DefinedBy(Api.COMPILER_TREE)
public DCDocComment newDocCommentTree(List<? extends DocTree> fullBody, List<? extends DocTree> tags) {
ListBuffer<DCTree> lb = new ListBuffer<>();
lb.addAll(cast(fullBody));
List<DCTree> fBody = lb.toList();
// A dummy comment to keep the diagnostics logic happy.
Comment c = new Comment() {
@Override
public String getText() {
return null;
}
@Override
public int getSourcePos(int index) {
return Position.NOPOS;
}
@Override
public CommentStyle getStyle() {
return CommentStyle.JAVADOC;
}
@Override
public boolean isDeprecated() {
return false;
}
};
Pair<List<DCTree>, List<DCTree>> pair = splitBody(fullBody);
DCDocComment tree = new DCDocComment(c, fBody, pair.fst, pair.snd, cast(tags));
return tree;
}
示例3: newDocCommentTree
@Override @DefinedBy(Api.COMPILER_TREE)
public DCDocComment newDocCommentTree(List<? extends DocTree> firstSentence, List<? extends DocTree> body, List<? extends DocTree> tags) {
ListBuffer<DCTree> lb = new ListBuffer<>();
lb.addAll(cast(firstSentence));
lb.addAll(cast(body));
List<DCTree> fullBody = lb.toList();
// A dummy comment to keep the diagnostics logic happy.
Comment c = new Comment() {
@Override
public String getText() {
return null;
}
@Override
public int getSourcePos(int index) {
return Position.NOPOS;
}
@Override
public CommentStyle getStyle() {
return CommentStyle.JAVADOC;
}
@Override
public boolean isDeprecated() {
return false;
}
};
DCDocComment tree = new DCDocComment(c, fullBody, cast(firstSentence), cast(body), cast(tags));
return tree;
}
示例4: isDeprecated
public boolean isDeprecated() {
if (!scanned && cs == CommentStyle.JAVADOC) {
scanDocComment();
}
return deprecatedFlag;
}