Package | Description |
---|---|
org.apache.sling.scripting.sightly.compiler.commands |
The
org.apache.sling.scripting.sightly.compiler.commands package defines the API for
Command processing. |
org.apache.sling.scripting.sightly.compiler.expression |
The
org.apache.sling.scripting.sightly.compiler.expression package defines the API for
Expression processing. |
org.apache.sling.scripting.sightly.compiler.expression.nodes |
The
org.apache.sling.scripting.sightly.compiler.expression.nodes package exposes the various
ExpressionNode types. |
Modifier and Type | Method and Description |
---|---|
ExpressionNode |
VariableBinding.Start.getExpression() |
ExpressionNode |
VariableBinding.Global.getExpression() |
Constructor and Description |
---|
Global(java.lang.String variableName,
ExpressionNode expressionNode) |
Start(java.lang.String variableName,
ExpressionNode expression) |
Modifier and Type | Method and Description |
---|---|
ExpressionNode |
Expression.getRoot()
Get the root node of this expression.
|
ExpressionNode |
Expression.removeOption(java.lang.String option)
Removes the given option from this expression.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,ExpressionNode> |
Expression.getOptions()
Get the options for this expression.
|
Modifier and Type | Method and Description |
---|---|
Expression |
Expression.withNode(ExpressionNode node)
Return a copy, but with the specified node as root.
|
Constructor and Description |
---|
Expression(ExpressionNode root)
Create an expression with just a root node.
|
Expression(ExpressionNode root,
java.util.Map<java.lang.String,ExpressionNode> options)
Create an expression with a root node and options.
|
Expression(ExpressionNode root,
java.util.Map<java.lang.String,ExpressionNode> options,
java.lang.String rawText)
Create an expression with a root node and options.
|
Constructor and Description |
---|
Expression(ExpressionNode root,
java.util.Map<java.lang.String,ExpressionNode> options)
Create an expression with a root node and options.
|
Expression(ExpressionNode root,
java.util.Map<java.lang.String,ExpressionNode> options,
java.lang.String rawText)
Create an expression with a root node and options.
|
Modifier and Type | Interface and Description |
---|---|
interface |
Atom
An
Atom defines an ExpressionNode that can be translated to simple text, like identifiers or primitive constants
(strings, booleans and numbers). |
Modifier and Type | Class and Description |
---|---|
class |
ArrayLiteral
Syntactical structure for an array of items.
|
class |
BinaryOperation
A {code BinaryOperation} defines an expression where a binary operator is applied (e.g.
|
class |
BooleanConstant
Defines a Boolean constant (e.g.
|
class |
Identifier
Defines a single variable.
|
class |
MapLiteral
Defines a syntactical construction representing a map.
|
class |
NullLiteral
Defines the null literal.
|
class |
NumericConstant
Defines a numeric constant expression (e.g.
|
class |
PropertyAccess
Defines an expression in which an object is queried for a specific property (e.g.
|
class |
RuntimeCall
A
RuntimeCall is a special expression which provides access to utility functions from the runtime. |
class |
StringConstant
Defines a simple string constant (e.g.
|
class |
TernaryOperator
Defines the HTL ternary operator (e.g.
|
class |
UnaryOperation
Defines a unary operation (e.g.
|
Modifier and Type | Method and Description |
---|---|
ExpressionNode |
TernaryOperator.getCondition()
Returns the condition of this operator.
|
ExpressionNode |
TernaryOperator.getElseBranch()
Returns the "else" branch.
|
ExpressionNode |
BinaryOperation.getLeftOperand()
Returns the left operand.
|
ExpressionNode |
PropertyAccess.getProperty()
Returns the expression node identifying the accessed property.
|
ExpressionNode |
BinaryOperation.getRightOperand()
Returns the right operand.
|
ExpressionNode |
UnaryOperation.getTarget()
Returns the target to which the operation is applied.
|
ExpressionNode |
PropertyAccess.getTarget()
The object being accessed.
|
ExpressionNode |
TernaryOperator.getThenBranch()
Returns the "then" branch.
|
ExpressionNode |
MapLiteral.getValue(java.lang.String key)
Returns an
ExpressionNode from the backing map. |
Modifier and Type | Method and Description |
---|---|
java.util.List<ExpressionNode> |
RuntimeCall.getArguments()
Get the nodes of the argument calls.
|
java.util.List<ExpressionNode> |
ArrayLiteral.getItems()
Returns an unmodifiable
List containing the array's elements. |
java.util.Map<java.lang.String,ExpressionNode> |
MapLiteral.getMap()
Returns an unmodifiable view of the backing map.
|
Constructor and Description |
---|
BinaryOperation(BinaryOperator operator,
ExpressionNode leftOperand,
ExpressionNode rightOperand)
Creates a
BinaryOperation . |
BinaryOperation(BinaryOperator operator,
ExpressionNode leftOperand,
ExpressionNode rightOperand,
Expression parentExpression)
Creates a
BinaryOperation . |
PropertyAccess(ExpressionNode target,
ExpressionNode property)
Creates a property access node.
|
PropertyAccess(ExpressionNode target,
java.lang.Iterable<java.lang.String> properties)
Builds a chained property access node with the given target and the specified properties.
|
PropertyAccess(ExpressionNode target,
java.lang.String property)
Creates a property access node.
|
RuntimeCall(java.lang.String functionName,
ExpressionNode... arguments)
Creates a
RuntimeCall based on a functionName and an array of arguments . |
TernaryOperator(ExpressionNode condition,
ExpressionNode thenBranch,
ExpressionNode elseBranch)
Creates the operator.
|
UnaryOperation(UnaryOperator operator,
ExpressionNode target)
Creates a
UnaryOperation . |
Constructor and Description |
---|
ArrayLiteral(java.util.List<ExpressionNode> items)
Creates an array from a list of
ExpressionNode elements. |
MapLiteral(java.util.Map<java.lang.String,ExpressionNode> map)
Creates a map representation.
|
RuntimeCall(java.lang.String functionName,
java.util.List<ExpressionNode> arguments)
Creates a
RuntimeCall based on a functionName and a list of arguments . |
Copyright © 2022 The Apache Software Foundation. All rights reserved.