Class ArrayLiteral
- java.lang.Object
-
- org.apache.sling.scripting.sightly.compiler.expression.nodes.ArrayLiteral
-
- All Implemented Interfaces:
ExpressionNode
public final class ArrayLiteral extends java.lang.Object implements ExpressionNode
Syntactical structure for an array of items.
-
-
Constructor Summary
Constructors Constructor Description ArrayLiteral(java.util.List<ExpressionNode> items)Creates an array from a list ofExpressionNodeelements.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(NodeVisitor<T> visitor)Accept a visitor to process this node.java.util.List<ExpressionNode>getItems()Returns an unmodifiableListcontaining the array's elements.
-
-
-
Constructor Detail
-
ArrayLiteral
public ArrayLiteral(java.util.List<ExpressionNode> items)
Creates an array from a list ofExpressionNodeelements.- Parameters:
items- the list ofExpressionNodeelements
-
-
Method Detail
-
getItems
public java.util.List<ExpressionNode> getItems()
Returns an unmodifiableListcontaining the array's elements.- Returns:
- an unmodifiable
List
-
accept
public <T> T accept(NodeVisitor<T> visitor)
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
-
-