private void save(Object from, SaveState into) {
			T val;
			try {
				val = (T) getter.invoke(from);
			}
			catch (Throwable e) {
				throw new AssertionError(e);
			}
			assert val != null;
			codec.write(into, name, val);
		}
Get an object from a {@link SaveState} using a known codec

<p>
This seems like something that should be in SaveState itself.

@param <T> the type of the value
@param state the state to read from
@param type the expected type of the value
@param name the name of the name-value pair
@return the value of the name-value pair
Ghidra/Debug/ProposedUtils/src/main/java/ghidra/framework/plugintool/AutoConfigState.java