Replicator

In the Star Trek universe, A replicator was a device that used transporter technology to dematerialize quantities of matter and then rematerialize that matter in another form. It was also capable of inverting its function, thus disposing of leftovers and dishes and storing the bulk material again. The closest analogue to this technology is the Universal Constructor, which requires raw material to work with, rather than creating from thin air.