I think I just realized this code is an example of the Adapter design pattern.