当前位置: 首页>>代码示例>>Java>>正文


Java Composer.checkNode方法代码示例

本文整理汇总了Java中org.yaml.snakeyaml.composer.Composer.checkNode方法的典型用法代码示例。如果您正苦于以下问题:Java Composer.checkNode方法的具体用法?Java Composer.checkNode怎么用?Java Composer.checkNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.yaml.snakeyaml.composer.Composer的用法示例。


在下文中一共展示了Composer.checkNode方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: composeAll

import org.yaml.snakeyaml.composer.Composer; //导入方法依赖的package包/类
/**
 * Parse all YAML documents in a stream and produce corresponding
 * representation trees.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            stream of YAML documents
 * @return parsed root Nodes for all the specified YAML documents
 */
public Iterable<Node> composeAll(Reader yaml) {
    final Composer composer = new Composer(new ParserImpl(new StreamReader(yaml)), resolver);
    constructor.setComposer(composer);
    Iterator<Node> result = new Iterator<Node>() {
        public boolean hasNext() {
            return composer.checkNode();
        }

        public Node next() {
            return composer.getNode();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new NodeIterable(result);
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:28,代码来源:Yaml.java

示例2: composeAll

import org.yaml.snakeyaml.composer.Composer; //导入方法依赖的package包/类
/**
 * Parse all YAML documents in a stream and produce corresponding
 * representation trees.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            stream of YAML documents
 * @return parsed root Nodes for all the specified YAML documents
 */
public Iterable<Node> composeAll(Reader yaml) {
    final Composer composer = new Composer(new ParserImpl(new StreamReader(yaml)), resolver);
    constructor.setComposer(composer);
    Iterator<Node> result = new Iterator<Node>() {
        public boolean hasNext() {
            return composer.checkNode();
        }

        public Node next() {
            return composer.getNode();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new NodeIterable(result);
}
 
开发者ID:RoccoDev,项目名称:5zig-TIMV-Plugin,代码行数:28,代码来源:Yaml.java

示例3: compose_all

import org.yaml.snakeyaml.composer.Composer; //导入方法依赖的package包/类
private List<Node> compose_all(InputStream file) {
    Composer composer = new Composer(new ParserImpl(new StreamReader(new UnicodeReader(file))),
            new Resolver());
    List<Node> documents = new ArrayList<Node>();
    while (composer.checkNode()) {
        documents.add(composer.getNode());
    }
    return documents;
}
 
开发者ID:cuizhennan,项目名称:snakeyaml,代码行数:10,代码来源:PyStructureTest.java

示例4: composeAll

import org.yaml.snakeyaml.composer.Composer; //导入方法依赖的package包/类
public Iterable<Node> composeAll(StreamReader yaml) {
    final Composer composer = new Composer(new ParserImpl(yaml), resolver);
    constructor.setComposer(composer);
    final Iterator<Node> result = new Iterator<Node>() {
        public boolean hasNext() {
            return composer.checkNode();
        }

        public Node next() {
            return composer.getNode();
        }

        public void remove() {
            throw new UnsupportedOperationException();
        }
    };
    return new Iterable<Node>() {
        public Iterator<Node> iterator() {
            return result;
        }
    };
}
 
开发者ID:wtetzner,项目名称:kurgan,代码行数:23,代码来源:YamlUtils.java

示例5: composeAll

import org.yaml.snakeyaml.composer.Composer; //导入方法依赖的package包/类
/**
 * Parse all YAML documents in a stream and produce corresponding representation trees.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            stream of YAML documents
 * @return parsed root Nodes for all the specified YAML documents
 */
public Iterable<Node> composeAll(final Reader yaml) {
	final Composer composer = new Composer(new ParserImpl(new StreamReader(yaml)), resolver);
	constructor.setComposer(composer);
	Iterator<Node> result = new Iterator<Node>() {
		@Override
		public boolean hasNext() {
			return composer.checkNode();
		}

		@Override
		public Node next() {
			return composer.getNode();
		}

		@Override
		public void remove() {
			throw new UnsupportedOperationException();
		}
	};
	return new NodeIterable(result);
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:30,代码来源:Yaml.java

示例6: canonical_compose_all

import org.yaml.snakeyaml.composer.Composer; //导入方法依赖的package包/类
private List<Node> canonical_compose_all(InputStream file) {
    StreamReader reader = new StreamReader(new UnicodeReader(file));
    StringBuilder buffer = new StringBuilder();
    while (reader.peek() != '\0') {
        buffer.append(reader.peek());
        reader.forward();
    }
    CanonicalParser parser = new CanonicalParser(buffer.toString());
    Composer composer = new Composer(parser, new Resolver());
    List<Node> documents = new ArrayList<Node>();
    while (composer.checkNode()) {
        documents.add(composer.getNode());
    }
    return documents;
}
 
开发者ID:bmoliveira,项目名称:snake-yaml,代码行数:16,代码来源:PyStructureTest.java


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