Class MultiArrayOperand

java.lang.Object
EDU.purdue.cs.bloat.editor.MultiArrayOperand

public class MultiArrayOperand extends Object
MultiArrayOperand encapsulates the operands to the multianewarray instruction. Each MultiArrayOperand contains the type descriptor of the new multidimensional array the instruction creates, as well as the number of dimensions in the array.
  • Constructor Details

    • MultiArrayOperand

      public MultiArrayOperand(Type type, int dim)
      Constructor.
      Parameters:
      type - The element type of the array.
      dim - The number of dimensions of the array.
  • Method Details

    • type

      public Type type()
      Get the element type of the array.
      Returns:
      The element type of the array.
    • dimensions

      public int dimensions()
      Get the number of dimensions of the array.
      Returns:
      The number of dimensions of the array.
    • toString

      public String toString()
      Convert the operand to a string.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the operand.