Electronic switch at the tailcap - how?

I have some cheap Costco 3xAAA XPG lights. The ones that come in 2-packs. They have electronic switches (and possibly all the driver electronics) in the tail. No idea how they do it though.

pics please

Glad I found this thread. I just picked up a Nitecore P20 that has a rear clicky with a momentary switch mounted next to it that will fire up a strobe when pressed (meaning the clicky is not the on-off switch for the circuit), and no secondary path for the positive charge to make it to the tail other than through the body. I wanted to take it apart to figure out how the heck it might work, but I'm sure I'll ruin it in the process.