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


Java Handler类代码示例

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


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

示例1: autoType

import net.aeten.core.event.Handler; //导入依赖的package包/类
private void autoType(Handler<ParsingData<MarkupNode>> handler, Tag<MarkupNode> current, String value, String defaultType) {
	final String type;
	switch (value) {
	case "true":
	case "false":
	case "True":
	case "False":
	case "TRUE":
	case "FALSE":
		type = boolean.class.getName();
		break;
	case "":
		type = Void.class.getName();
		break;
	default:
		type = defaultType;
	}
	if (type != null) {
		fireEvent(ParsingEvent.START_NODE, MarkupNode.TYPE, type, current.parent);
		fireEvent(ParsingEvent.END_NODE, MarkupNode.TYPE, type, current.parent);
	}
}
 
开发者ID:aeten,项目名称:net.aeten.core.parsing,代码行数:23,代码来源:YamlParser.java

示例2: close

import net.aeten.core.event.Handler; //导入依赖的package包/类
private Tag<MarkupNode> close(Handler<ParsingData<MarkupNode>> handler, Tag<MarkupNode> current, int currentLevel, int newLevel) {
	if (current.name == null && current.parent != null && current.parent.childrenNodeType == MarkupNode.LIST) {
		currentLevel--;
	}
	for (int i = currentLevel; i >= newLevel; i--) {
		if (current.name != null) {
			fireEvent(ParsingEvent.END_NODE, MarkupNode.TAG, current.name, current.parent);
		}
		current = current.parent;
		if (current == null) {
			break;
		}
		if (newLevel != i) {
			fireEvent(ParsingEvent.END_NODE, current.childrenNodeType, null, current);
		}
	}
	return current;
}
 
开发者ID:aeten,项目名称:net.aeten.core.parsing,代码行数:19,代码来源:YamlParser.java

示例3: addEventHandler

import net.aeten.core.event.Handler; //导入依赖的package包/类
@Override
public void addEventHandler(Handler<MessengerEventData<Message>> eventHandler, @SuppressWarnings("unchecked") HookEvent<MessengerEvent, Hook>... eventList) {
	hookTransmitter.addEventHandler(eventHandler, eventList);
}
 
开发者ID:aeten,项目名称:net.aeten.core.messenger,代码行数:5,代码来源:MessengerProvider.java

示例4: removeEventHandler

import net.aeten.core.event.Handler; //导入依赖的package包/类
@Override
public void removeEventHandler(Handler<MessengerEventData<Message>> eventHandler, @SuppressWarnings("unchecked") HookEvent<MessengerEvent, Hook>... eventList) {
	hookTransmitter.removeEventHandler(eventHandler, eventList);
}
 
开发者ID:aeten,项目名称:net.aeten.core.messenger,代码行数:5,代码来源:MessengerProvider.java

示例5: addEventHandler

import net.aeten.core.event.Handler; //导入依赖的package包/类
@Override
public void addEventHandler(Handler<MessengerAcknowledgeEventData<Message, Acknowledge>> eventHandler, MessengerAcknowledgeEvent... eventList) {
	this.eventTransmitter.addEventHandler(eventHandler, eventList);

}
 
开发者ID:aeten,项目名称:net.aeten.core.messenger,代码行数:6,代码来源:MessengerAcknowledgeHook.java

示例6: removeEventHandler

import net.aeten.core.event.Handler; //导入依赖的package包/类
@Override
public void removeEventHandler(Handler<MessengerAcknowledgeEventData<Message, Acknowledge>> eventHandler, MessengerAcknowledgeEvent... eventList) {
	this.eventTransmitter.removeEventHandler(eventHandler, eventList);
}
 
开发者ID:aeten,项目名称:net.aeten.core.messenger,代码行数:5,代码来源:MessengerAcknowledgeHook.java

示例7: ParserImplementationHelper

import net.aeten.core.event.Handler; //导入依赖的package包/类
protected ParserImplementationHelper(Parser<MarkupNode> parser, Reader reader, Handler<ParsingData<MarkupNode>> handler, boolean replaceEolByLf) {
	this.parser = parser;
	this.reader = new BufferedReader(reader);
	this.handler = handler;
	this.replaceEolByLf = replaceEolByLf;
}
 
开发者ID:aeten,项目名称:net.aeten.core,代码行数:7,代码来源:AbstractParser.java

示例8: fireEvent

import net.aeten.core.event.Handler; //导入依赖的package包/类
private void fireEvent(Handler<ParsingData<MarkupNode>> handler, ParsingEvent event, MarkupNode nodeType, String value, Tag parent) {
	handler.handleEvent(new ParsingData<MarkupNode>(this, event, nodeType, value, (parent == null)? null: parent.name));
}
 
开发者ID:aeten,项目名称:net.aeten.core.parsing,代码行数:4,代码来源:PropertiesParser.java

示例9: parse

import net.aeten.core.event.Handler; //导入依赖的package包/类
@Override
public void parse(Reader reader, Handler<ParsingData<MarkupNode>> handler) throws ParsingException {
	new YamlParserImpl(this, reader, handler).parse();
}
 
开发者ID:aeten,项目名称:net.aeten.core.parsing,代码行数:5,代码来源:YamlParser.java

示例10: YamlParserImpl

import net.aeten.core.event.Handler; //导入依赖的package包/类
protected YamlParserImpl(Parser<MarkupNode> parser, Reader reader, Handler<ParsingData<MarkupNode>> handler) {
	super(parser, reader, handler, true);
}
 
开发者ID:aeten,项目名称:net.aeten.core.parsing,代码行数:4,代码来源:YamlParser.java

示例11: closeDocument

import net.aeten.core.event.Handler; //导入依赖的package包/类
private void closeDocument(Handler<ParsingData<MarkupNode>> handler, Tag<MarkupNode> current, int currentLevel) {
	close(handler, current, currentLevel, -1);

	fireEvent(ParsingEvent.END_NODE, MarkupNode.DOCUMENT, null, null);
}
 
开发者ID:aeten,项目名称:net.aeten.core.parsing,代码行数:6,代码来源:YamlParser.java

示例12: addObserver

import net.aeten.core.event.Handler; //导入依赖的package包/类
void addObserver(Handler<EventData<M, F>> observer); 
开发者ID:aeten,项目名称:net.aeten.core,代码行数:2,代码来源:Model.java

示例13: removeObserver

import net.aeten.core.event.Handler; //导入依赖的package包/类
void removeObserver(Handler<EventData<M, F>> observer); 
开发者ID:aeten,项目名称:net.aeten.core,代码行数:2,代码来源:Model.java

示例14: parse

import net.aeten.core.event.Handler; //导入依赖的package包/类
public void parse(Reader reader, Handler<ParsingData<NodeType>> handler) throws ParsingException; 
开发者ID:aeten,项目名称:net.aeten.core,代码行数:2,代码来源:Parser.java


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