Class UnaryOperation
java.lang.Object
org.apache.sling.scripting.sightly.compiler.expression.nodes.UnaryOperation
- All Implemented Interfaces:
ExpressionNode
Defines a unary operation (e.g.
!variableName
).-
Constructor Summary
ConstructorDescriptionUnaryOperation
(UnaryOperator operator, ExpressionNode target) Creates aUnaryOperation
. -
Method Summary
Modifier and TypeMethodDescription<T> T
accept
(NodeVisitor<T> visitor) Accept a visitor to process this node.Returns the operator applied in this operation.Returns the target to which the operation is applied.toString()
-
Constructor Details
-
UnaryOperation
Creates aUnaryOperation
.- Parameters:
operator
- the operatortarget
- the target to which the operator is applied
-
-
Method Details
-
accept
Description copied from interface:ExpressionNode
Accept a visitor to process this node.- Specified by:
accept
in interfaceExpressionNode
- Type Parameters:
T
- the type of the visitor- Parameters:
visitor
- The visitor- Returns:
- the node after it has been evaluated by the visitor
-
getOperator
Returns the operator applied in this operation.- Returns:
- the operator applied in this operation
-
getTarget
Returns the target to which the operation is applied.- Returns:
- the target to which the operation is applied
-
toString
-