Class ArrayLiteral
java.lang.Object
org.apache.sling.scripting.sightly.compiler.expression.nodes.ArrayLiteral
- All Implemented Interfaces:
ExpressionNode
Syntactical structure for an array of items.
-
Constructor Summary
ConstructorsConstructorDescriptionArrayLiteral(List<ExpressionNode> items) Creates an array from a list ofExpressionNodeelements. -
Method Summary
Modifier and TypeMethodDescription<T> Taccept(NodeVisitor<T> visitor) Accept a visitor to process this node.getItems()Returns an unmodifiableListcontaining the array's elements.
-
Constructor Details
-
ArrayLiteral
Creates an array from a list ofExpressionNodeelements.- Parameters:
items- the list ofExpressionNodeelements
-
-
Method Details
-
getItems
Returns an unmodifiableListcontaining the array's elements.- Returns:
- an unmodifiable
List
-
accept
Description copied from interface:ExpressionNodeAccept a visitor to process this node.- Specified by:
acceptin interfaceExpressionNode- Type Parameters:
T- the type of the visitor- Parameters:
visitor- The visitor- Returns:
- the node after it has been evaluated by the visitor
-