reflect used to encode generic primitive structures