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

Java Parser类代码示例

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

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



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

示例1: parse

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

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


示例2: parse

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(Reader yaml) {
    final Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new Iterator<Event>() {
        public boolean hasNext() {
            return parser.peekEvent() != null;
        }

        public Event next() {
            return parser.getEvent();
        }

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


示例3: parse

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
protected List<Event> parse(InputStream input) throws IOException {
    StreamReader reader = new StreamReader(new UnicodeReader(input));
    Parser parser = new ParserImpl(reader);
    List<Event> result = new ArrayList<Event>();
    while (parser.peekEvent() != null) {
        result.add(parser.getEvent());
    }
    input.close();
    return result;
}
 
开发者ID:cuizhennan,项目名称:snakeyaml,代码行数:11,代码来源:PyImportTest.java


示例4: parse

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
/**
 * Parse a YAML stream and produce parsing events.
 * 
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 * @param yaml
 *            YAML document(s)
 * @return parsed events
 */
public Iterable<Event> parse(final Reader yaml) {
	final Parser parser = new ParserImpl(new StreamReader(yaml));
	Iterator<Event> result = new Iterator<Event>() {
		@Override
		public boolean hasNext() {
			return parser.peekEvent() != null;
		}

		@Override
		public Event next() {
			return parser.getEvent();
		}

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


示例5: construct

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
private Object construct(Constructor constructor, String data) {
    StreamReader reader = new StreamReader(data);
    Parser parser = new ParserImpl(reader);
    Resolver resolver = new Resolver();
    Composer composer = new Composer(parser, resolver);
    constructor.setComposer(composer);
    return constructor.getSingleData(Object.class);
}
 
开发者ID:bmoliveira,项目名称:snake-yaml,代码行数:9,代码来源:ConstructorMappingTest.java


示例6: construct

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
@SuppressWarnings("unchecked")
private List<Object> construct(Constructor constructor, String data) {
    StreamReader reader = new StreamReader(data);
    Parser parser = new ParserImpl(reader);
    Resolver resolver = new Resolver();
    Composer composer = new Composer(parser, resolver);
    constructor.setComposer(composer);
    List<Object> result = (List<Object>) constructor.getSingleData(Object.class);
    return result;
}
 
开发者ID:bmoliveira,项目名称:snake-yaml,代码行数:11,代码来源:ConstructorSequenceTest.java


示例7: Composer

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
public Composer(Parser parser, Resolver resolver) {
    this.parser = parser;
    this.resolver = resolver;
    this.anchors = new HashMap<String, Node>();
    this.recursiveNodes = new HashSet<Node>();
}
 
开发者ID:imkiva,项目名称:AndroidApktool,代码行数:7,代码来源:Composer.java


示例8: YamlParserEventIterator

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
YamlParserEventIterator(Parser parser)
{
    this.parser = parser;
}
 
开发者ID:GotoFinal,项目名称:diorite-configs-java8,代码行数:5,代码来源:YamlParserEventIterator.java


示例9: FragmentComposer

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
public FragmentComposer(Parser parser, Resolver resolver, String nodeName) {
    super(parser, resolver);
    this.nodeName = nodeName;
}
 
开发者ID:bmoliveira,项目名称:snake-yaml,代码行数:5,代码来源:FragmentComposer.java


示例10: Composer

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
public Composer(final Parser parser, final Resolver resolver) {
	this.parser = parser;
	this.resolver = resolver;
	this.anchors = new HashMap<String, Node>();
	this.recursiveNodes = new HashSet<Node>();
}
 
开发者ID:OpenNTF,项目名称:org.openntf.domino,代码行数:7,代码来源:Composer.java


示例11: parse

import org.yaml.snakeyaml.parser.Parser; //导入依赖的package包/类
/**
 * Parse a YAML stream and produce parsing events.
 *
 * @param yaml
 *         YAML document(s)
 *
 * @return parsed events
 *
 * @see <a href="http://yaml.org/spec/1.1/#id859333">Processing Overview</a>
 */
public Iterable<Event> parse(Reader yaml)
{
    Parser parser = new ParserImpl(new StreamReader(yaml));
    Iterator<Event> result = new YamlParserEventIterator(parser);
    return new YamlEventIterable(result);
}
 
开发者ID:GotoFinal,项目名称:diorite-configs-java8,代码行数:17,代码来源:Yaml.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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