Class CommandVariableUsage
java.lang.Object
org.apache.sling.scripting.sightly.compiler.commands.AbstractCommandVisitor
org.apache.sling.scripting.sightly.impl.compiler.optimization.CommandVariableUsage
- All Implemented Interfaces:
CommandVisitor
Extracts the variables used in a command
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionextractVariables
(Command command) void
visit
(Conditional.Start conditionalStart) Process aConditional.Start
command.void
visit
(Loop.Start loopStart) Process aLoop.Start
command.void
visit
(OutputVariable outputVariable) Process aOutputVariable
command.void
visit
(Procedure.Call procedureCall) Process aProcedure.Call
command.void
visit
(VariableBinding.Global globalAssignment) Process aVariableBinding.Global
command.void
visit
(VariableBinding.Start variableBindingStart) Process aVariableBinding.Start
command.
-
Constructor Details
-
CommandVariableUsage
public CommandVariableUsage()
-
-
Method Details
-
extractVariables
-
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 aVariableBinding.Start
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
variableBindingStart
- the command
-
visit
Description copied from interface:CommandVisitor
Process aVariableBinding.Global
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
globalAssignment
- the command
-
visit
Description copied from interface:CommandVisitor
Process aOutputVariable
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
outputVariable
- 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 aProcedure.Call
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classAbstractCommandVisitor
- Parameters:
procedureCall
- the command
-