@ParametersAreNonnullByDefault public class CountingEventListener extends AbstractEventListener
EventListener
that counts the number of different element.Constructor and Description |
---|
CountingEventListener() |
Modifier and Type | Method and Description |
---|---|
void |
onAttribute(ProxyAttribute attribute)
Handles an attribute in the current element.
|
void |
onComplete()
Handles the end of the current task.
|
void |
onReference(ProxyReference reference)
Handles a reference from the current element to another.
|
void |
onStartElement(ProxyElement element)
Handles the start of an element.
|
onEndElement, onInitialize
public void onStartElement(ProxyElement element)
Handler
onStartElement
in interface Handler
onStartElement
in class AbstractEventListener
element
- the element of the new elementHandler.onEndElement()
,
Notifier.notifyStartElement(ProxyElement)
public void onAttribute(ProxyAttribute attribute)
Handler
onAttribute
in interface Handler
onAttribute
in class AbstractEventListener
attribute
- the new attributeHandler.onStartElement(ProxyElement)
,
Notifier.notifyAttribute(ProxyAttribute)
public void onReference(ProxyReference reference)
Handler
onReference
in interface Handler
onReference
in class AbstractEventListener
reference
- the new referenceHandler.onStartElement(ProxyElement)
,
Notifier.notifyReference(ProxyReference)
public void onComplete()
Handler
onComplete
in interface Handler
onComplete
in class AbstractEventListener
Handler.onInitialize()
,
Notifier.notifyComplete()
Copyright © 2013–2019 Atlanmod. All rights reserved.