I think guns work in a similar fashion to how they did in the first Borderlands. In BL1 each gun had 5 or so different 'parts' to them (receiver, grip, magazine, accessory, etc.) and each 'part' had several variations (An assault rifle magazine could hold lots of ammo for instance, or a different magazine could hold less ammo and fire smei-auto but do lots of damage). When combined in different ways, this would make even two guns that are the same except for their magazines rather different. Combined with the bonuses and negatives from the manufacturer it made even 'identical' guns from different companies perform differently. The thing is, the guns all used the same parts, but they just slapped a different texture on them if they were a higher grade or made by a certain company.
Borderlands 2 expands on this aspect so much more, each manufacturer has their own special attributes (Jakobs guns fire as quickly as you pull the trigger, while a Hyperion gun will be very inaccurate, but get more accurate as you sustain fire). I'm fairly sure it still has the whole 'barrel, receiver, grip' aspect in place but now each gun part seems to be tied to the manufacturer instead of just a general parts list. I haven't gotten to look at any of the gun building aspect in BL2 though so I could be wrong.
But no, you cannot build guns in BL2, I'm just saying in BL1 there was a cheat program that allowed you to cheat guns and items into your inventory, and you could swap the parts they had.
EDIT: Bl1 also had different 'parts' for things like shields and grenade mods, but BL2 expands on that sooooo much more. BL2 is just better in every single aspect.