First understand the difference between "Trap-Focus" and what I call "Focus-Trap".

(While some lenses will let you focus while the camera focus motor is engaged, this is not good for the motor so don't do it.)

Lenses with a M-M/A switch will allow you to do both types of trapping, lenses with a M-A switch only allow for "Focus-Trap".

Trap-Focus - You preset (or pick) the focus point and either turn the focus ring until that point is in focus (all the while pressing the shutter button), move in and out until that point is in focus or wait for something to move into that point of focus. (AF-S and I believe G lenses) M-M/A switch has to be set to M/A

Focus-Trap - M-A switch set to M, adjust focus (or for macro set reproduction ratio). Move switch to A then either move in and out until selected target focuses or wait for subject to move into that point. (Again with shutter button pressed.) This works with AF-D and I believe AF lenses.

This is not theory, I have actually tested this on both AF-S/G and AD-D. And I re-tested it again today using both an 85 1.4 AF-D and a 60 2.8 AF-D.