Class ArrayPath<A,E>

Type Parameters:
A - array type
E - array element type
All Implemented Interfaces:
ArrayExpression<A,E>, Expression<A>, Path<A>, Serializable

public class ArrayPath<A,E> extends SimpleExpression<A> implements Path<A>, ArrayExpression<A,E>
ArrayPath represents an array typed path
Author:
tiwe
See Also:
  • Constructor Details

    • ArrayPath

      protected ArrayPath(Class<? super A> type, String variable)
    • ArrayPath

      protected ArrayPath(Class<? super A> type, Path<?> parent, String property)
    • ArrayPath

      protected ArrayPath(Class<? super A> type, PathMetadata metadata)
  • Method Details

    • accept

      public final <R, C> R accept(Visitor<R,C> v, C context)
      Description copied from interface: Expression
      Accept the visitor with the given context
      Specified by:
      accept in interface Expression<A>
      Type Parameters:
      R - return type
      C - context type
      Parameters:
      v - visitor
      context - context of visit
      Returns:
      result of visit
    • get

      public SimplePath<E> get(Expression<Integer> index)
      Description copied from interface: ArrayExpression
      Create a this[index] expression

      Returns the element at the given index

      Specified by:
      get in interface ArrayExpression<A,E>
      Parameters:
      index - zero based index
      Returns:
      element at index
    • get

      public SimplePath<E> get(@org.jetbrains.annotations.Range(from=0L, to=2147483647L) int index)
      Description copied from interface: ArrayExpression
      Create a this[index] expression

      Returns the element at the given index

      Specified by:
      get in interface ArrayExpression<A,E>
      Parameters:
      index - zero based index
      Returns:
      element at index
    • getElementType

      public Class<E> getElementType()
    • getMetadata

      public PathMetadata getMetadata()
      Description copied from interface: Path
      Get the metadata for this path
      Specified by:
      getMetadata in interface Path<A>
      Returns:
      path metadata
    • getRoot

      public Path<?> getRoot()
      Description copied from interface: Path
      Get the root for this path
      Specified by:
      getRoot in interface Path<A>
      Returns:
      root of path
    • getAnnotatedElement

      public AnnotatedElement getAnnotatedElement()
      Description copied from interface: Path
      Return the annotated element related to the given path

      For property paths the annotated element contains the annotations of the related field and/or getter method and for all others paths the annotated element is the expression type.

      Specified by:
      getAnnotatedElement in interface Path<A>
      Returns:
      annotated element
    • size

      public NumberExpression<Integer> size()
      Description copied from interface: ArrayExpression
      Create a this.size() expression

      Returns the size of the array as an expression

      Specified by:
      size in interface ArrayExpression<A,E>
      Returns:
      size of array