Class SanityChecker
java.lang.Object
org.apache.sling.scripting.sightly.compiler.commands.AbstractCommandVisitor
org.apache.sling.scripting.sightly.impl.compiler.debug.SanityChecker
- All Implemented Interfaces:
CommandHandler
,CommandVisitor
A visitor which checks a stream for correct closing of things
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
attachChecker
(CommandStream commandStream) void
onDone()
This method is called when the stream has been closed.void
Allows this handler to process theCommand
that was just written into the stream to which this handler was attached.void
Allows this handler to process error states.void
visit
(Conditional.End conditionalEnd) Process aConditional.End
command.void
visit
(Conditional.Start conditionalStart) Process aConditional.Start
command.void
Process aLoop.End
command.void
visit
(Loop.Start loopStart) Process aLoop.Start
command.void
visit
(Procedure.End endProcedure) Process aProcedure.End
command.void
visit
(Procedure.Start startProcedure) Process aProcedure.Start
command.void
visit
(VariableBinding.End variableBindingEnd) Process aVariableBinding.End
command.void
visit
(VariableBinding.Start variableBindingStart) Process aVariableBinding.Start
command.Methods inherited from class org.apache.sling.scripting.sightly.compiler.commands.AbstractCommandVisitor
visit, visit, visit, visit
-
Method Details
-
attachChecker
-
onEmit
Description copied from interface:CommandHandler
Allows this handler to process theCommand
that was just written into the stream to which this handler was attached.- Specified by:
onEmit
in interfaceCommandHandler
- Parameters:
command
- the received command
-
onError
Description copied from interface:CommandHandler
Allows this handler to process error states.- Specified by:
onError
in interfaceCommandHandler
- Parameters:
errorMessage
- the error's message
-
onDone
public void onDone()Description copied from interface:CommandHandler
This method is called when the stream has been closed. The contract is that after this call, no other commands or errors will be emitted.- Specified by:
onDone
in interfaceCommandHandler
-
visit
Description copied from interface:CommandVisitor
Process aConditional.Start
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
conditionalStart
- the command
-
visit
Description copied from interface:CommandVisitor
Process aConditional.End
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
conditionalEnd
- the command
-
visit
Description copied from interface:CommandVisitor
Process aVariableBinding.Start
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
variableBindingStart
- the command
-
visit
Description copied from interface:CommandVisitor
Process aVariableBinding.End
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
variableBindingEnd
- the command
-
visit
Description copied from interface:CommandVisitor
Process aLoop.Start
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
loopStart
- the command
-
visit
Description copied from interface:CommandVisitor
Process aLoop.End
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
loopEnd
- the command
-
visit
Description copied from interface:CommandVisitor
Process aProcedure.Start
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
startProcedure
- the command
-
visit
Description copied from interface:CommandVisitor
Process aProcedure.End
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
endProcedure
- the command
-