本文整理汇总了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);
}
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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));
}
示例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();
}
示例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);
}
示例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);
}
示例12: addObserver
import net.aeten.core.event.Handler; //导入依赖的package包/类
void addObserver(Handler<EventData<M, F>> observer);
示例13: removeObserver
import net.aeten.core.event.Handler; //导入依赖的package包/类
void removeObserver(Handler<EventData<M, F>> observer);
示例14: parse
import net.aeten.core.event.Handler; //导入依赖的package包/类
public void parse(Reader reader, Handler<ParsingData<NodeType>> handler) throws ParsingException;