• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Constant类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.yaml.snakeyaml.scanner.Constant的典型用法代码示例。如果您正苦于以下问题:Java Constant类的具体用法?Java Constant怎么用?Java Constant使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Constant类属于org.yaml.snakeyaml.scanner包,在下文中一共展示了Constant类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: forward

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
/**
 * read the next length characters and move the pointer.
 * 
 * @param length
 */
public void forward(int length) {
    if (this.pointer + length + 1 >= this.buffer.length()) {
        update();
    }
    char ch = 0;
    for (int i = 0; i < length; i++) {
        ch = this.buffer.charAt(this.pointer);
        this.pointer++;
        this.index++;
        if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charAt(pointer) != '\n')) {
            this.line++;
            this.column = 0;
        } else if (ch != '\uFEFF') {
            this.column++;
        }
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:23,代码来源:StreamReader.java


示例2: forward

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
/**
 * read the next length characters and move the pointer.
 * if the last character is high surrogate one more character will be read
 * 
 * @param length amount of characters to move forward
 */
public void forward(int length) {
    int c;
    for (int i = 0; i < length; i++) {
        if (this.pointer == this.buffer.length()) {
            update();
        }
        if (this.pointer == this.buffer.length()) {
            break;
        }

        c = this.buffer.codePointAt(this.pointer);
        this.pointer += Character.charCount(c);
        this.index += Character.charCount(c);
        if (Constant.LINEBR.has(c) || (c == '\r' && buffer.charAt(pointer) != '\n')) {
            this.line++;
            this.column = 0;
        } else if (c != 0xFEFF) {
            this.column++;
        }
    }

    if (this.pointer == this.buffer.length()) {
        update();
    }
}
 
开发者ID:RoccoDev,项目名称:5zig-TIMV-Plugin,代码行数:32,代码来源:StreamReader.java


示例3: determineBlockHints

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
private String determineBlockHints(String text)
    {
        StringBuilder hints = new StringBuilder();
//        if (Constant.LINEBR.has(text.charAt(0), " ")) disabled, always add indent marker to prevent formatting problems.
        {
            hints.append(this.bestIndent);
        }
        char ch1 = text.charAt(text.length() - 1);
        if (Constant.LINEBR.hasNo(ch1))
        {
            hints.append("-");
        }
        else if ((text.length() == 1) || Constant.LINEBR.has(text.charAt(text.length() - 2)))
        {
            hints.append("+");
        }
        return hints.toString();
    }
 
开发者ID:Diorite,项目名称:Diorite,代码行数:19,代码来源:Emitter.java


示例4: forward

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
/**
 * read the next length characters and move the pointer.
 * 
 */
public void forward(final int length) {
	if (this.pointer + length + 1 >= this.buffer.length()) {
		update();
	}
	char ch = 0;
	for (int i = 0; i < length; i++) {
		ch = this.buffer.charAt(this.pointer);
		this.pointer++;
		this.index++;
		if (Constant.LINEBR.has(ch) || (ch == '\r' && buffer.charAt(pointer) != '\n')) {
			this.line++;
			this.column = 0;
		} else if (ch != '\uFEFF') {
			this.column++;
		}
	}
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:22,代码来源:StreamReader.java


示例5: determineBlockHints

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
private String determineBlockHints(String text) {
    StringBuilder hints = new StringBuilder();
    if (Constant.LINEBR.has(text.charAt(0), " ")) {
        hints.append(bestIndent);
    }
    char ch1 = text.charAt(text.length() - 1);
    if (Constant.LINEBR.hasNo(ch1)) {
        hints.append("-");
    } else if (text.length() == 1 || Constant.LINEBR.has(text.charAt(text.length() - 2))) {
        hints.append("+");
    }
    return hints.toString();
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:14,代码来源:Emitter.java


示例6: isLineBreak

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
private boolean isLineBreak(char ch) {
    return Constant.NULL_OR_LINEBR.has(ch);
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:4,代码来源:Mark.java


示例7: writeLiteral

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
void writeLiteral(String text) throws IOException {
    String hints = determineBlockHints(text);
    writeIndicator("|" + hints, true, false, false);
    if (hints.length() > 0 && (hints.charAt(hints.length() - 1)) == '+') {
        openEnded = true;
    }
    writeLineBreak(null);
    boolean breaks = true;
    int start = 0, end = 0;
    while (end <= text.length()) {
        char ch = 0;
        if (end < text.length()) {
            ch = text.charAt(end);
        }
        if (breaks) {
            if (ch == 0 || Constant.LINEBR.hasNo(ch)) {
                String data = text.substring(start, end);
                for (char br : data.toCharArray()) {
                    if (br == '\n') {
                        writeLineBreak(null);
                    } else {
                        writeLineBreak(String.valueOf(br));
                    }
                }
                if (ch != 0) {
                    writeIndent();
                }
                start = end;
            }
        } else {
            if (ch == 0 || Constant.LINEBR.has(ch)) {
                stream.write(text, start, end - start);
                if (ch == 0) {
                    writeLineBreak(null);
                }
                start = end;
            }
        }
        if (ch != 0) {
            breaks = Constant.LINEBR.has(ch);
        }
        end++;
    }
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:45,代码来源:Emitter.java


示例8: isLineBreak

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
private boolean isLineBreak(int c) {
    return Constant.NULL_OR_LINEBR.has(c);
}
 
开发者ID:RoccoDev,项目名称:5zig-TIMV-Plugin,代码行数:4,代码来源:Mark.java


示例9: writeLiteral

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
void writeLiteral(String text) throws IOException
{
    String hints = this.determineBlockHints(text);
    this.writeIndicator("|" + hints, true, false, false);
    if (! hints.isEmpty() && ((hints.charAt(hints.length() - 1)) == '+'))
    {
        this.openEnded = true;
    }
    this.writeLineBreak(null);
    boolean breaks = true;
    int start = 0, end = 0;
    while (end <= text.length())
    {
        char ch = 0;
        if (end < text.length())
        {
            ch = text.charAt(end);
        }
        if (breaks)
        {
            if ((ch == 0) || Constant.LINEBR.hasNo(ch))
            {
                String data = text.substring(start, end);
                for (char br : data.toCharArray())
                {
                    if (br == '\n')
                    {
                        this.writeLineBreak(null);
                    }
                    else
                    {
                        this.writeLineBreak(String.valueOf(br));
                    }
                }
                if (ch != 0)
                {
                    this.writeIndent();
                }
                start = end;
            }
        }
        else
        {
            if ((ch == 0) || Constant.LINEBR.has(ch))
            {
                this.stream.write(text, start, end - start);
                if (ch == 0)
                {
                    this.writeLineBreak(null);
                }
                start = end;
            }
        }
        if (ch != 0)
        {
            breaks = Constant.LINEBR.has(ch);
        }
        end++;
    }
}
 
开发者ID:Diorite,项目名称:Diorite,代码行数:61,代码来源:Emitter.java


示例10: writeLiteral

import org.yaml.snakeyaml.scanner.Constant; //导入依赖的package包/类
void writeLiteral(String text) throws IOException {
    String hints = determineBlockHints(text);
    writeIndicator("|" + hints, true, false, false);
    if (hints.length() > 0 && (hints.charAt(hints.length() - 1)) == '+') {
        openEnded = true;
    }
    writeLineBreak(null);
    boolean breaks = true;
    int start = 0, end = 0;
    while (end <= text.length()) {
        char ch = 0;
        if (end < text.length()) {
            ch = text.charAt(end);
        }
        if (breaks) {
            if (ch == 0 || Constant.LINEBR.hasNo(ch)) {
                String data = text.substring(start, end);
                for (char br : data.toCharArray()) {
                    if (br == '\n') {
                        writeLineBreak(null);
                    } else {
                        writeLineBreak(String.valueOf(br));
                    }
                }
                if (ch != 0) {
                    writeIndent();
                }
                start = end;
            }
        } else {
            if (ch == 0 || Constant.LINEBR.has(ch)) {
                stream.write(text, start, end - start);
                if (ch == 0) {
                    writeLineBreak(null);
                }
                start = end;
            }
        }
        if (ch != 0) {
            breaks = (Constant.LINEBR.has(ch));
        }
        end++;
    }
}
 
开发者ID:timvisee,项目名称:TestTheTeacher,代码行数:45,代码来源:Emitter.java



注:本文中的org.yaml.snakeyaml.scanner.Constant类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ThreadLocalActiveSpanSource类代码示例发布时间:2022-05-23
下一篇:
Java SimpleColoredText类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap