public static Stella_Object accessConsSlotValue(Cons self, Symbol slotname, Stella_Object value, boolean setvalueP) {
    if (slotname == Stella.SYM_STELLA_VALUE) {
      if (setvalueP) {
        self.value = value;
      }
      else {
        value = self.value;
      }
    }
    else if (slotname == Stella.SYM_STELLA_REST) {
      if (setvalueP) {
        self.rest = ((Cons)(value));
      }
      else {
        value = self.rest;
      }
    }
    else {
      { OutputStringStream stream000 = OutputStringStream.newOutputStringStream();

        stream000.nativeStream.print("`" + slotname + "' is not a valid case option");
        throw ((StellaException)(StellaException.newStellaException(stream000.theStringReader()).fillInStackTrace()));
      }
    }
    return (value);
  }