Package EDU.purdue.cs.bloat.editor
Class MultiArrayOperand
- java.lang.Object
-
- EDU.purdue.cs.bloat.editor.MultiArrayOperand
-
public class MultiArrayOperand extends java.lang.ObjectMultiArrayOperand 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 Summary
Constructors Constructor Description MultiArrayOperand(Type type, int dim)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intdimensions()Get the number of dimensions of the array.java.lang.StringtoString()Convert the operand to a string.Typetype()Get the element type of the array.
-
-
-
Constructor Detail
-
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 Detail
-
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 java.lang.String toString()
Convert the operand to a string.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the operand.
-
-