Class ConstantFolding
java.lang.Object
org.apache.sling.scripting.sightly.impl.compiler.visitor.UniformVisitor
org.apache.sling.scripting.sightly.impl.compiler.visitor.TrackingVisitor<EvalResult>
org.apache.sling.scripting.sightly.impl.compiler.optimization.reduce.ConstantFolding
- All Implemented Interfaces:
CommandVisitor
,EmitterVisitor
Optimization which evaluates constant expressions during compilation-time
-
Field Summary
Fields inherited from class org.apache.sling.scripting.sightly.impl.compiler.visitor.TrackingVisitor
tracker
-
Method Summary
Modifier and TypeMethodDescriptionprotected EvalResult
assignDefault
(Command command) Get the output streamprotected void
static StreamTransformer
void
visit
(VariableBinding.Start variableBindingStart) Process aVariableBinding.Start
command.Methods inherited from class org.apache.sling.scripting.sightly.impl.compiler.visitor.TrackingVisitor
visit, visit, visit
Methods inherited from class org.apache.sling.scripting.sightly.impl.compiler.visitor.UniformVisitor
visit, visit, visit, visit, visit, visit, visit, visit
-
Method Details
-
transformer
-
visit
Description copied from interface:CommandVisitor
Process aVariableBinding.Start
command.- Specified by:
visit
in interfaceCommandVisitor
- Overrides:
visit
in classTrackingVisitor<EvalResult>
- Parameters:
variableBindingStart
- the command
-
assignDefault
- Specified by:
assignDefault
in classTrackingVisitor<EvalResult>
-
onCommand
- Specified by:
onCommand
in classUniformVisitor
-
getOutputStream
Description copied from interface:EmitterVisitor
Get the output stream- Specified by:
getOutputStream
in interfaceEmitterVisitor
- Returns:
- the output stream of this visitor
-