Class EnforceHandler
java.lang.Object
org.dbunit.dataset.common.handlers.AbstractPipelineComponent
org.dbunit.dataset.common.handlers.EnforceHandler
- All Implemented Interfaces:
Handler,PipelineComponent
Pipeline component that delegates to the first wrapped
PipelineComponent able to
handle a character, throwing IllegalInputCharacterException if none of them can.- Since:
- 2.2 (Sep 12, 2004)
- Version:
- $Revision$ $Date$
- Author:
- fede, Last changed by: $Author$
-
Nested Class Summary
Nested classes/interfaces inherited from class org.dbunit.dataset.common.handlers.AbstractPipelineComponent
AbstractPipelineComponent.ACCEPT, AbstractPipelineComponent.IGNORE -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandle(char c) Determines whether this handler can handle the given character.static final PipelineComponentENFORCE(PipelineComponent component) Creates a handler that enforces the given component to handle the character.static final PipelineComponentENFORCE(PipelineComponent[] components) Creates a handler that enforces the first of the given components able to handle the character.protected PipelineComponent[]Returns the components tried, in order, to handle a character.protected voidsetEnforcedComponents(PipelineComponent[] enforcedComponents) Sets the components tried, in order, to handle a character.voidsetPipeline(Pipeline pipeline) Sets the pipeline this component belongs to.Methods inherited from class org.dbunit.dataset.common.handlers.AbstractPipelineComponent
accept, allowForNoMoreInput, createPipelineComponent, getHelper, getPipeline, getPipelineConfig, getSuccessor, handle, noMoreInput, setSuccessor
-
Method Details
-
ENFORCE
Creates a handler that enforces the given component to handle the character.- Parameters:
component- the component that must handle the character.- Returns:
- the new pipeline component.
-
ENFORCE
Creates a handler that enforces the first of the given components able to handle the character.- Parameters:
components- the components, tried in order, one of which must handle the character.- Returns:
- the new pipeline component.
-
canHandle
Description copied from interface:HandlerDetermines whether this handler can handle the given character.- Parameters:
c- the character to check.- Returns:
trueif this handler can handle the character.- Throws:
IllegalInputCharacterException- if the character is not valid in the current context.
-
setPipeline
Description copied from interface:PipelineComponentSets the pipeline this component belongs to.- Specified by:
setPipelinein interfacePipelineComponent- Overrides:
setPipelinein classAbstractPipelineComponent- Parameters:
pipeline- the owning pipeline.
-
getEnforcedComponents
Returns the components tried, in order, to handle a character.- Returns:
- the components tried, in order, to handle a character.
-
setEnforcedComponents
Sets the components tried, in order, to handle a character.- Parameters:
enforcedComponents- the components tried, in order, to handle a character.
-