if (container.getTypeParams() != null) {
if (cparams != null) {
  public static TypeParam[] getAllTypeParams(GenericWrapper wrapper) {    int count = 0;    GenericWrapper container = wrapper;    while (container != null) {      if (container.getTypeParams() != null) {        count += container.getTypeParams().length;      }      container = getContainingWrapper(container);    }    if (count == 0) return null;    TypeParam[] params = new TypeParam[count];    container = wrapper;    int start = params.length;    while (container != null) {      TypeParam[] cparams = container.getTypeParams();      if (container.getTypeParams() != null) {        start -= cparams.length;        for (int i = 0; i < cparams.length; i++) {          params[start + i] = cparams[i];        }      }      container = getContainingWrapper(container);    }    if (start != 0) throw new RuntimeException("Oops, internal error, didn't completely fill typeparams array");    return params;  }