Class ArrayConstructorExpression

java.lang.Object
org.rumbledb.expressions.Node
org.rumbledb.expressions.Expression
org.rumbledb.expressions.primary.ArrayConstructorExpression

public class ArrayConstructorExpression extends Expression
  • Constructor Details

    • ArrayConstructorExpression

      public ArrayConstructorExpression(Expression expression, ExceptionMetadata metadata)
      Curly array constructor: array { expr }. Each item produced by the expression becomes a singleton member.
    • ArrayConstructorExpression

      public ArrayConstructorExpression(ExceptionMetadata metadata)
      Empty array constructor (curly or square with no members).
    • ArrayConstructorExpression

      public ArrayConstructorExpression(List<Expression> memberExpressions, boolean isFixedSlotsArrayConstructor, ExceptionMetadata metadata)
      Square array constructor: [ E1, E2, ... ]. Each expression becomes a separate member whose result (possibly a sequence) is preserved.
  • Method Details

    • getExpression

      public Expression getExpression()
    • getMemberExpressions

      public List<Expression> getMemberExpressions()
    • isFixedSlotsArrayConstructor

      public boolean isFixedSlotsArrayConstructor()
    • getChildren

      public List<Node> getChildren()
      Description copied from class: Node
      Returns all children nodes as a list. The list is new and can be modified at will by the caller.
      Specified by:
      getChildren in class Node
      Returns:
      the children nodes as a list.
    • serializeToJSONiq

      public void serializeToJSONiq(StringBuffer sb, int indent)
      Specified by:
      serializeToJSONiq in class Node
    • accept

      public <T> T accept(AbstractNodeVisitor<T> visitor, T argument)
      Description copied from class: Node
      Accept method for the visitor pattern.
      Specified by:
      accept in class Node
      Type Parameters:
      T - the type of the objects returned by the visitor.
      Parameters:
      visitor - the visitor.
      argument - the input from the visitor.
      Returns:
      the object returned by this visitor