Class NodeTransformer
- java.lang.Object
-
- org.apache.sling.scripting.sightly.impl.compiler.util.expression.NodeTransformer
-
- All Implemented Interfaces:
NodeVisitor<ExpressionNode>
public class NodeTransformer extends Object implements NodeVisitor<ExpressionNode>
-
-
Constructor Summary
Constructors Constructor Description NodeTransformer()
-
Method Summary
-
-
-
Method Detail
-
transform
public final ExpressionNode transform(ExpressionNode node)
-
evaluate
public ExpressionNode evaluate(PropertyAccess propertyAccess)
Description copied from interface:NodeVisitorEvaluate aPropertyAccessnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
propertyAccess- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(Identifier identifier)
Description copied from interface:NodeVisitorEvaluate anIdentifiernode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
identifier- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(StringConstant text)
Description copied from interface:NodeVisitorEvaluate aStringConstantnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
text- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(BinaryOperation binaryOperation)
Description copied from interface:NodeVisitorEvaluate aBinaryOperationnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
binaryOperation- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(BooleanConstant booleanConstant)
Description copied from interface:NodeVisitorEvaluate aBooleanConstantnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
booleanConstant- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(NumericConstant numericConstant)
Description copied from interface:NodeVisitorEvaluate aNumericConstantnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
numericConstant- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(UnaryOperation unaryOperation)
Description copied from interface:NodeVisitorEvaluate aUnaryOperationnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
unaryOperation- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(TernaryOperator ternaryOperator)
Description copied from interface:NodeVisitorEvaluate aTernaryOperatornode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
ternaryOperator- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(RuntimeCall runtimeCall)
Description copied from interface:NodeVisitorEvaluate aRuntimeCallnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
runtimeCall- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(MapLiteral mapLiteral)
Description copied from interface:NodeVisitorEvaluate aMapLiteralnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
mapLiteral- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(ArrayLiteral arrayLiteral)
Description copied from interface:NodeVisitorEvaluate aArrayLiteralnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
arrayLiteral- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public ExpressionNode evaluate(NullLiteral nullLiteral)
Description copied from interface:NodeVisitorEvaluate aNullLiteralnode.- Specified by:
evaluatein interfaceNodeVisitor<ExpressionNode>- Parameters:
nullLiteral- the node to evaluate- Returns:
- the evaluation result
-
-