Class SideEffectVisitor
- java.lang.Object
-
- org.apache.sling.scripting.sightly.compiler.expression.SideEffectVisitor
-
- All Implemented Interfaces:
NodeVisitor<java.lang.Object>
public abstract class SideEffectVisitor extends java.lang.Object implements NodeVisitor<java.lang.Object>
Expression visitor which does not return anything for nodes; instead it performs specific side-effects depending on the expression nodes types.
-
-
Constructor Summary
Constructors Constructor Description SideEffectVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description java.lang.Object
evaluate(ArrayLiteral arrayLiteral)
Evaluate aArrayLiteral
node.java.lang.Object
evaluate(BinaryOperation binaryOperation)
Evaluate aBinaryOperation
node.java.lang.Object
evaluate(BooleanConstant booleanConstant)
Evaluate aBooleanConstant
node.java.lang.Object
evaluate(Identifier identifier)
Evaluate anIdentifier
node.java.lang.Object
evaluate(MapLiteral mapLiteral)
Evaluate aMapLiteral
node.java.lang.Object
evaluate(NullLiteral nullLiteral)
Evaluate aNullLiteral
node.java.lang.Object
evaluate(NumericConstant numericConstant)
Evaluate aNumericConstant
node.java.lang.Object
evaluate(PropertyAccess propertyAccess)
Evaluate aPropertyAccess
node.java.lang.Object
evaluate(RuntimeCall runtimeCall)
Evaluate aRuntimeCall
node.java.lang.Object
evaluate(StringConstant text)
Evaluate aStringConstant
node.java.lang.Object
evaluate(TernaryOperator ternaryOperator)
Evaluate aTernaryOperator
node.java.lang.Object
evaluate(UnaryOperation unaryOperation)
Evaluate aUnaryOperation
node.abstract void
visit(ArrayLiteral arrayLiteral)
abstract void
visit(BinaryOperation binaryOperation)
abstract void
visit(BooleanConstant booleanConstant)
abstract void
visit(Identifier identifier)
abstract void
visit(MapLiteral mapLiteral)
abstract void
visit(NullLiteral nullLiteral)
abstract void
visit(NumericConstant numericConstant)
abstract void
visit(PropertyAccess propertyAccess)
abstract void
visit(RuntimeCall runtimeCall)
abstract void
visit(StringConstant text)
abstract void
visit(TernaryOperator ternaryOperator)
abstract void
visit(UnaryOperation unaryOperation)
-
-
-
Method Detail
-
visit
public abstract void visit(PropertyAccess propertyAccess)
-
visit
public abstract void visit(Identifier identifier)
-
visit
public abstract void visit(StringConstant text)
-
visit
public abstract void visit(BinaryOperation binaryOperation)
-
visit
public abstract void visit(BooleanConstant booleanConstant)
-
visit
public abstract void visit(NumericConstant numericConstant)
-
visit
public abstract void visit(UnaryOperation unaryOperation)
-
visit
public abstract void visit(TernaryOperator ternaryOperator)
-
visit
public abstract void visit(RuntimeCall runtimeCall)
-
visit
public abstract void visit(MapLiteral mapLiteral)
-
visit
public abstract void visit(ArrayLiteral arrayLiteral)
-
visit
public abstract void visit(NullLiteral nullLiteral)
-
evaluate
public java.lang.Object evaluate(PropertyAccess propertyAccess)
Description copied from interface:NodeVisitor
Evaluate aPropertyAccess
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
propertyAccess
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(Identifier identifier)
Description copied from interface:NodeVisitor
Evaluate anIdentifier
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
identifier
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(StringConstant text)
Description copied from interface:NodeVisitor
Evaluate aStringConstant
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
text
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(BinaryOperation binaryOperation)
Description copied from interface:NodeVisitor
Evaluate aBinaryOperation
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
binaryOperation
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(BooleanConstant booleanConstant)
Description copied from interface:NodeVisitor
Evaluate aBooleanConstant
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
booleanConstant
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(NumericConstant numericConstant)
Description copied from interface:NodeVisitor
Evaluate aNumericConstant
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
numericConstant
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(UnaryOperation unaryOperation)
Description copied from interface:NodeVisitor
Evaluate aUnaryOperation
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
unaryOperation
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(TernaryOperator ternaryOperator)
Description copied from interface:NodeVisitor
Evaluate aTernaryOperator
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
ternaryOperator
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(RuntimeCall runtimeCall)
Description copied from interface:NodeVisitor
Evaluate aRuntimeCall
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
runtimeCall
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(MapLiteral mapLiteral)
Description copied from interface:NodeVisitor
Evaluate aMapLiteral
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
mapLiteral
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(ArrayLiteral arrayLiteral)
Description copied from interface:NodeVisitor
Evaluate aArrayLiteral
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
arrayLiteral
- the node to evaluate- Returns:
- the evaluation result
-
evaluate
public java.lang.Object evaluate(NullLiteral nullLiteral)
Description copied from interface:NodeVisitor
Evaluate aNullLiteral
node.- Specified by:
evaluate
in interfaceNodeVisitor<java.lang.Object>
- Parameters:
nullLiteral
- the node to evaluate- Returns:
- the evaluation result
-
-