Package dev.cel.optimizer.optimizers
Class ConstantFoldingOptimizer
- java.lang.Object
-
- dev.cel.optimizer.optimizers.ConstantFoldingOptimizer
-
- All Implemented Interfaces:
CelAstOptimizer
public final class ConstantFoldingOptimizer extends java.lang.Object implements CelAstOptimizer
Performs optimization for inlining constant scalar and aggregate literal values within function calls and select statements with their evaluated result.
-
-
Field Summary
Fields Modifier and Type Field Description static ConstantFoldingOptimizerINSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CelAbstractSyntaxTreeoptimize(CelNavigableAst navigableAst, Cel cel)Optimizes a single AST.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface dev.cel.optimizer.CelAstOptimizer
replaceSubtree
-
-
-
-
Field Detail
-
INSTANCE
public static final ConstantFoldingOptimizer INSTANCE
-
-
Method Detail
-
optimize
public CelAbstractSyntaxTree optimize(CelNavigableAst navigableAst, Cel cel) throws CelOptimizationException
Description copied from interface:CelAstOptimizerOptimizes a single AST.- Specified by:
optimizein interfaceCelAstOptimizer- Throws:
CelOptimizationException
-
-