Package org.smooks.benchmark
Class BenchmarkVisitor
- java.lang.Object
-
- org.smooks.benchmark.BenchmarkVisitor
-
- All Implemented Interfaces:
ContentHandler
,AfterVisitor
,BeforeVisitor
,ChildrenVisitor
,ElementVisitor
,SaxNgVisitor
,Visitor
public class BenchmarkVisitor extends Object implements ElementVisitor
-
-
Constructor Summary
Constructors Constructor Description BenchmarkVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitAfter(Element element, ExecutionContext executionContext)
Visits the end of anElement
.void
visitBefore(Element element, ExecutionContext executionContext)
Visits the beginning of anElement
.void
visitChildElement(Element childElement, ExecutionContext executionContext)
Visits a childElement
.void
visitChildText(CharacterData characterData, ExecutionContext executionContext)
Visits the character data of anElement
.
-
-
-
Method Detail
-
visitAfter
public void visitAfter(Element element, ExecutionContext executionContext)
Description copied from interface:AfterVisitor
Visits the end of anElement
.- Specified by:
visitAfter
in interfaceAfterVisitor
- Parameters:
element
- theElement
representing the end of the fragment. TheElement
's ancestors are traversable unless the global configuration parametermaintain.element.stack
is set to false. TheElement
's child nodes are traversable if one of the following conditions are met:max.node.depth
global config parameter is set to 0 or greater than 1, or- this
AfterVisitor
implementsParameterizedVisitor.getMaxNodeDepth()
which returns an integer greater than 1
executionContext
- the currentExecutionContext
-
visitBefore
public void visitBefore(Element element, ExecutionContext executionContext)
Description copied from interface:BeforeVisitor
Visits the beginning of anElement
.- Specified by:
visitBefore
in interfaceBeforeVisitor
- Parameters:
element
- theElement
representing the beginning of the fragment. TheElement
's ancestors are traversable unless the global configuration parametermaintain.element.stack
is set to false. TheElement
's child nodes are not traversable.executionContext
- the currentExecutionContext
-
visitChildText
public void visitChildText(CharacterData characterData, ExecutionContext executionContext)
Description copied from interface:ChildrenVisitor
Visits the character data of anElement
. This method is invoked once for each chunk of character data. A shortcut for collecting character data is to annotate theSaxNgVisitor
implementation withorg.smooks.engine.delivery.sax.annotation.StreamResultWriter
, or stash the character data in aTextAccumulatorMemento
and restore theTextAccumulatorMemento
inAfterVisitor.visitAfter(Element, ExecutionContext)
.- Specified by:
visitChildText
in interfaceChildrenVisitor
- Parameters:
characterData
- thenode
which includes character data but not any childElement
s. TheElement
's ancestors are traversable unless the global configuration parametermaintain.element.stack
is set to false.executionContext
- the currentExecutionContext
-
visitChildElement
public void visitChildElement(Element childElement, ExecutionContext executionContext)
Description copied from interface:ChildrenVisitor
Visits a childElement
. This method is invoked once for each childElement
.- Specified by:
visitChildElement
in interfaceChildrenVisitor
- Parameters:
childElement
- the childElementElement
's ancestors are traversable unless the global configuration parametermaintain.element.stack
is set to false. TheElement
's child nodes are not traversable.executionContext
- the currentExecutionContext
-
-