class GArrayRef extends JArrayRef implements Precedence {

  public GArrayRef(Value base, Value index) {
    super(Grimp.v().newObjExprBox(base), Grimp.v().newExprBox(index));
  }

  @Override
  public int getPrecedence() {
    return 950;
  }

  @Override
  public void toString(UnitPrinter up) {<FILL_FUNCTION_BODY>}

  @Override
  public String toString() {
    final Value op1 = getBase();
    String leftOp = op1.toString();
    if (op1 instanceof Precedence && ((Precedence) op1).getPrecedence() < getPrecedence()) {
      leftOp = "(" + leftOp + ")";
    }
    return leftOp + "[" + getIndex().toString() + "]";
  }

  @Override
  public Object clone() {
    return new GArrayRef(Grimp.cloneIfNecessary(getBase()), Grimp.cloneIfNecessary(getIndex()));
  }
}

    final boolean needsBrackets = PrecedenceTest.needsBrackets(baseBox, this);
    if (needsBrackets) {
      up.literal("(");
    }
    baseBox.toString(up);
    if (needsBrackets) {
      up.literal(")");
    }
    up.literal("[");
    indexBox.toString(up);
    up.literal("]");
  
<methods>public void <init>(soot.Value, soot.Value) ,public void apply(soot.util.Switch) ,public java.lang.Object clone() ,public void convertToBaf(soot.jimple.JimpleToBafContext, List<soot.Unit>) ,public int equivHashCode() ,public boolean equivTo(java.lang.Object) ,public soot.Value getBase() ,public soot.ValueBox getBaseBox() ,public soot.Value getIndex() ,public soot.ValueBox getIndexBox() ,public soot.Type getType() ,public List<soot.ValueBox> getUseBoxes() ,public void setBase(soot.Local) ,public void setIndex(soot.Value) ,public java.lang.String toString() ,public void toString(soot.UnitPrinter) <variables>protected final non-sealed soot.ValueBox baseBox,protected final non-sealed soot.ValueBox indexBox