Package org.apache.sling.scripting.sightly.compiler.expression.nodes

## Class ArrayLiteral

- java.lang.Object
- - org.apache.sling.scripting.sightly.compiler.expression.nodes.ArrayLiteral

All Implemented Interfaces:
  `ExpressionNode`

    public final class ArrayLiteral
    extends Object
    implements ExpressionNode

Syntactical structure for an array of items.

### Constructor Summary

Constructors
`ArrayLiteral​(List<ExpressionNode> items)` Creates an array from a list of `ExpressionNode` elements.

### Method Summary

All Methods Instance Methods Concrete Methods
`<T> T` `accept​(NodeVisitor<T> visitor)` Accept a visitor to process this node.
`List<ExpressionNode>` `getItems()` Returns an unmodifiable `List` containing the array's elements.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### ArrayLiteral

    public ArrayLiteral​(List<ExpressionNode> items)

Creates an array from a list of `ExpressionNode` elements.

Parameters:
  `items` - the list of `ExpressionNode` elements

### Method Detail

#### getItems

    public List<ExpressionNode> getItems()

Returns an unmodifiable `List` containing the array's elements.

Returns:
  an unmodifiable `List`

#### accept

    public <T> T accept​(NodeVisitor<T> visitor)

Description copied from interface: `ExpressionNode`
Accept a visitor to process this node.

Specified by:
  `accept` in interface `ExpressionNode`
Type Parameters:
  `T` - the type of the visitor
Parameters:
  `visitor` - The visitor
Returns:
  the node after it has been evaluated by the visitor