protected <T> StateBackedCreator<T, STATE> createWithoutConstructorInvocation(
final Class<T> type, Class<STATE> stateType) {
ReflectionFactory rf = ReflectionFactory.getReflectionFactory();
Constructor<?> objectConstructor = getDeclaredConstructor(Object.class);
final Constructor<?> serializationConstructor = rf.newConstructorForSerialization(type, objectConstructor);
return new StateBackedCreator<T, STATE>() {
public T create(STATE state, Class<T> c) throws Exception {
final T result = type.cast(serializationConstructor.newInstance());
setState(result, state);
return result;