Interface IJavaNewArray

All Superinterfaces:
IJavaElement, IJavaExpression, IJavaStatement

@Ser public interface IJavaNewArray extends IJavaStatement, IJavaExpression
Java AST interface to represent the instantiation of an array object.
  • Method Details

    • getType

      IJavaType getType()
      Get the type of array being instantiated.
      Returns:
      the type string
    • getSizes

      List<IJavaExpression> getSizes()
      Get the list of dimensions for the array.
      Returns:
      the list of dimensions, may be null if the array is created by providing a list of initial values
    • hasInitialValues

      boolean hasInitialValues()
      Returns:
    • getInitialValues

      List<IJavaExpression> getInitialValues()
      Get the list of initial values for the array.
      Returns:
      the list of initial values, may be null if the array is created by sizes
    • duplicate

      IJavaNewArray duplicate()
      Description copied from interface: IJavaElement
      Duplicate this element.
      Specified by:
      duplicate in interface IJavaElement
      Specified by:
      duplicate in interface IJavaExpression
      Specified by:
      duplicate in interface IJavaStatement
      Returns:
      a (possibly) duplicated object of the same type