public int arity() {
    { MethodSlot self = this;

      if (((BooleanWrapper)(KeyValueList.dynamicSlotValue(self.dynamicSlots, Stella.SYM_STELLA_METHOD_VARIABLE_ARGUMENTSp, Stella.FALSE_WRAPPER))).wrapperValue) {
        return (Stella.NULL_INTEGER);
      }
      { int returntypecount = self.methodReturnTypeSpecifiers().length();
        int result = self.methodParameterTypeSpecifiers().length() + returntypecount;

        switch (returntypecount) {
          case 1: 
            if (((StandardObject)(self.methodReturnTypeSpecifiers().first())) == Stella.SGT_STELLA_BOOLEAN) {
              return (result - 1);
            }
            else {
              return (result);
            }
          case 0: 
            return (result);
          default:
            if (((StandardObject)(self.methodReturnTypeSpecifiers().last())) == Stella.SGT_STELLA_BOOLEAN) {
              return (result - 1);
            }
            else {
              return (result);
            }
        }
      }
    }
  }