/** * Two MultiANewArray instructions are equal if they have the same * type and dimensions, or if the type and dimensions of either is unset. */ public boolean equalsInstruction(Instruction other) { if (other == this) return true; if (!(other instanceof MultiANewArrayInstruction)) return false; if (!super.equalsInstruction(other)) return false; MultiANewArrayInstruction ins = (MultiANewArrayInstruction) other; int dims = getDimensions(); int otherDims = ins.getDimensions(); return dims == -1 || otherDims == -1 || dims == otherDims; }
/** * Two MultiANewArray instructions are equal if they have the same * type and dimensions, or if the type and dimensions of either is unset. */ public boolean equalsInstruction(Instruction other) { if (other == this) return true; if (!(other instanceof MultiANewArrayInstruction)) return false; if (!super.equalsInstruction(other)) return false; MultiANewArrayInstruction ins = (MultiANewArrayInstruction) other; int dims = getDimensions(); int otherDims = ins.getDimensions(); return dims == -1 || otherDims == -1 || dims == otherDims; }