FormatOnSaveOptionsBase<S> () { try { //noinspection unchecked FormatOnSaveOptionsBase<S> clone = (FormatOnSaveOptionsBase<S>)super.clone(); //noinspection unchecked clone.myState = (S)myState.clone(); return clone; } catch (CloneNotSupportedException e) { throw new AssertionError(); } }