本文整理汇总了Java中org.yaml.snakeyaml.tokens.Token.getEndMark方法的典型用法代码示例。如果您正苦于以下问题:Java Token.getEndMark方法的具体用法?Java Token.getEndMark怎么用?Java Token.getEndMark使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.yaml.snakeyaml.tokens.Token
的用法示例。
在下文中一共展示了Token.getEndMark方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: produce
import org.yaml.snakeyaml.tokens.Token; //导入方法依赖的package包/类
public Event produce() {
// Parse the document end.
Token token = scanner.peekToken();
Mark startMark = token.getStartMark();
Mark endMark = startMark;
boolean explicit = false;
if (scanner.checkToken(Token.ID.DocumentEnd)) {
token = scanner.getToken();
endMark = token.getEndMark();
explicit = true;
}
Event event = new DocumentEndEvent(startMark, endMark, explicit);
// Prepare the next state.
state = new ParseDocumentStart();
return event;
}
示例2: produce
import org.yaml.snakeyaml.tokens.Token; //导入方法依赖的package包/类
@Override
public Event produce() {
// Parse the document end.
Token token = scanner.peekToken();
Mark startMark = token.getStartMark();
Mark endMark = startMark;
boolean explicit = false;
if (scanner.checkToken(Token.ID.DocumentEnd)) {
token = scanner.getToken();
endMark = token.getEndMark();
explicit = true;
}
Event event = new DocumentEndEvent(startMark, endMark, explicit);
// Prepare the next state.
state = new ParseDocumentStart();
return event;
}
示例3: guessTokenType
import org.yaml.snakeyaml.tokens.Token; //导入方法依赖的package包/类
@NotNull
private Token guessTokenType(Token token, Token nextToken) {
// Maybe it's comment?
if (myText.subSequence(token.getEndMark().getIndex(), nextToken.getStartMark().getIndex()).toString().contains("#"))
return new CommentToken(token.getEndMark(), nextToken.getStartMark());
return new WhitespaceToken(token.getEndMark(), nextToken.getStartMark());
}