當前位置: 首頁>>代碼示例>>Java>>正文


Java DumperOptions.getIndicatorIndent方法代碼示例

本文整理匯總了Java中org.yaml.snakeyaml.DumperOptions.getIndicatorIndent方法的典型用法代碼示例。如果您正苦於以下問題:Java DumperOptions.getIndicatorIndent方法的具體用法?Java DumperOptions.getIndicatorIndent怎麽用?Java DumperOptions.getIndicatorIndent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.yaml.snakeyaml.DumperOptions的用法示例。


在下文中一共展示了DumperOptions.getIndicatorIndent方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: Emitter

import org.yaml.snakeyaml.DumperOptions; //導入方法依賴的package包/類
public Emitter(Writer stream, DumperOptions opts) {
    // The stream should have the methods `write` and possibly `flush`.
    this.stream = stream;
    // Emitter is a state machine with a stack of states to handle nested
    // structures.
    this.states = new ArrayStack<EmitterState>(100);
    this.state = new ExpectStreamStart();
    // Current event and the event queue.
    this.events = new ArrayBlockingQueue<Event>(100);
    this.event = null;
    // The current indentation level and the stack of previous indents.
    this.indents = new ArrayStack<Integer>(10);
    this.indent = null;
    // Flow level.
    this.flowLevel = 0;
    // Contexts.
    mappingContext = false;
    simpleKeyContext = false;

    //
    // Characteristics of the last emitted character:
    // - current position.
    // - is it a whitespace?
    // - is it an indention character
    // (indentation space, '-', '?', or ':')?
    column = 0;
    whitespace = true;
    indention = true;

    // Whether the document requires an explicit document indicator
    openEnded = false;

    // Formatting details.
    this.canonical = opts.isCanonical();
    this.prettyFlow = opts.isPrettyFlow();
    this.allowUnicode = opts.isAllowUnicode();
    this.bestIndent = 2;
    if ((opts.getIndent() > MIN_INDENT) && (opts.getIndent() < MAX_INDENT)) {
        this.bestIndent = opts.getIndent();
    }
    this.indicatorIndent = opts.getIndicatorIndent();
    this.bestWidth = 80;
    if (opts.getWidth() > this.bestIndent * 2) {
        this.bestWidth = opts.getWidth();
    }
    this.bestLineBreak = opts.getLineBreak().getString().toCharArray();
    this.splitLines = opts.getSplitLines();

    // Tag prefixes.
    this.tagPrefixes = new LinkedHashMap<String, String>();

    // Prepared anchor and tag.
    this.preparedAnchor = null;
    this.preparedTag = null;

    // Scalar analysis and style.
    this.analysis = null;
    this.style = null;
}
 
開發者ID:imkiva,項目名稱:AndroidApktool,代碼行數:60,代碼來源:Emitter.java


注:本文中的org.yaml.snakeyaml.DumperOptions.getIndicatorIndent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。