int a = 0, n = s.length;
Class<?> c = s.getClass().getComponentType();
T t[] = (T[]) newInstance(c, n + 1);
arraycopy(s, a, t, a, i);
t[i] = x;
arraycopy(s, i, t, i + 1, n - i);
int a = 0, n = s.length;
Class<?> c = s.getClass().getComponentType();
T t[] = (T[]) newInstance(c, n + 1);
arraycopy(s, a, t, a, i);
t[i] = x;
arraycopy(s, i, t, i + 1, n - i);