Java 类org.yaml.snakeyaml.events.NodeEvent 实例源码

项目:AndroidApktool    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("没有为锚点对象指定别名");
    }
    processAnchor("*");
    state = states.pop();
}
项目:AndroidApktool    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping());
}
项目:AndroidApktool    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}
项目:5zig-TIMV-Plugin    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("anchor is not specified for alias");
    }
    processAnchor("*");
    state = states.pop();
}
项目:5zig-TIMV-Plugin    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping());
}
项目:5zig-TIMV-Plugin    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}
项目:diorite-configs-java8    文件:Emitter.java   
boolean checkSimpleKey()
{
    int length = 0;
    if ((this.event instanceof NodeEvent) && (((NodeEvent) this.event).getAnchor() != null))
    {
        if (this.preparedAnchor == null)
        {
            this.preparedAnchor = prepareAnchor(((NodeEvent) this.event).getAnchor());
        }
        length += this.preparedAnchor.length();
    }
    String tag = null;
    if (this.event instanceof ScalarEvent)
    {
        tag = ((ScalarEvent) this.event).getTag();
    }
    else if (this.event instanceof CollectionStartEvent)
    {
        tag = ((CollectionStartEvent) this.event).getTag();
    }
    if (tag != null)
    {
        if (this.preparedTag == null)
        {
            this.preparedTag = this.prepareTag(tag);
        }
        length += this.preparedTag.length();
    }
    if (this.event instanceof ScalarEvent)
    {
        if (this.analysis == null)
        {
            this.analysis = this.analyzeScalar(((ScalarEvent) this.event).getValue());
        }
        length += this.analysis.scalar.length();
    }
    return (length < SMALL_LENGTH) && ((this.event instanceof AliasEvent) ||
                                       ((this.event instanceof ScalarEvent) && ! ((this.analysis == null) || this.analysis.empty) &&
                                        ! this.analysis.multiline) || this.checkEmptySequence() || this.checkEmptyMapping());
}
项目:snake-yaml    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("anchor is not specified for alias");
    }
    processAnchor("*");
    state = states.pop();
}
项目:snake-yaml    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping());
}
项目:snake-yaml    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}
项目:SubServers-2    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("anchor is not specified for alias");
    }
    processAnchor("*");
    state = states.pop();
}
项目:SubServers-2    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping());
}
项目:SubServers-2    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}
项目:Diorite    文件:Emitter.java   
boolean checkSimpleKey()
{
    int length = 0;
    if ((this.event instanceof NodeEvent) && (((NodeEvent) this.event).getAnchor() != null))
    {
        if (this.preparedAnchor == null)
        {
            this.preparedAnchor = prepareAnchor(((NodeEvent) this.event).getAnchor());
        }
        length += this.preparedAnchor.length();
    }
    String tag = null;
    if (this.event instanceof ScalarEvent)
    {
        tag = ((ScalarEvent) this.event).getTag();
    }
    else if (this.event instanceof CollectionStartEvent)
    {
        tag = ((CollectionStartEvent) this.event).getTag();
    }
    if (tag != null)
    {
        if (this.preparedTag == null)
        {
            this.preparedTag = this.prepareTag(tag);
        }
        length += this.preparedTag.length();
    }
    if (this.event instanceof ScalarEvent)
    {
        if (this.analysis == null)
        {
            this.analysis = this.analyzeScalar(((ScalarEvent) this.event).getValue());
        }
        length += this.analysis.scalar.length();
    }
    return (length < SMALL_LENGTH) && ((this.event instanceof AliasEvent) ||
                                       ((this.event instanceof ScalarEvent) && ! ((this.analysis == null) || this.analysis.empty) &&
                                        ! this.analysis.multiline) || this.checkEmptySequence() || this.checkEmptyMapping());
}
项目:snakeyaml    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("anchor is not specified for alias");
    }
    processAnchor("*");
    state = states.pop();
}
项目:snakeyaml    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping());
}
项目:snakeyaml    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}
项目:TestTheTeacher    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("anchor is not specified for alias");
    }
    processAnchor("*");
    state = states.pop();
}
项目:TestTheTeacher    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return (length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping()));
}
项目:TestTheTeacher    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}
项目:org.openntf.domino    文件:Emitter.java   
private void expectAlias() throws IOException {
    if (((NodeEvent) event).getAnchor() == null) {
        throw new EmitterException("anchor is not specified for alias");
    }
    processAnchor("*");
    state = states.pop();
}
项目:org.openntf.domino    文件:Emitter.java   
private boolean checkSimpleKey() {
    int length = 0;
    if (event instanceof NodeEvent && ((NodeEvent) event).getAnchor() != null) {
        if (preparedAnchor == null) {
            preparedAnchor = prepareAnchor(((NodeEvent) event).getAnchor());
        }
        length += preparedAnchor.length();
    }
    String tag = null;
    if (event instanceof ScalarEvent) {
        tag = ((ScalarEvent) event).getTag();
    } else if (event instanceof CollectionStartEvent) {
        tag = ((CollectionStartEvent) event).getTag();
    }
    if (tag != null) {
        if (preparedTag == null) {
            preparedTag = prepareTag(tag);
        }
        length += preparedTag.length();
    }
    if (event instanceof ScalarEvent) {
        if (analysis == null) {
            analysis = analyzeScalar(((ScalarEvent) event).getValue());
        }
        length += analysis.scalar.length();
    }
    return (length < 128 && (event instanceof AliasEvent
            || (event instanceof ScalarEvent && !analysis.empty && !analysis.multiline)
            || checkEmptySequence() || checkEmptyMapping()));
}
项目:org.openntf.domino    文件:Emitter.java   
private void processAnchor(String indicator) throws IOException {
    NodeEvent ev = (NodeEvent) event;
    if (ev.getAnchor() == null) {
        preparedAnchor = null;
        return;
    }
    if (preparedAnchor == null) {
        preparedAnchor = prepareAnchor(ev.getAnchor());
    }
    writeIndicator(indicator + preparedAnchor, true, false, false);
    preparedAnchor = null;
}