"hostname" is what's usually used, but that isn't necessarily "the" DNS name or even "a" DNS name, since the hostname is often set from a config file before network services boot up.
I put "the" in quotes, since a server can and often does have multiple DNS names. For example www2.mousetech.com is also ftp.mousetech.com and once was cvs.mousetech.com as well.
Most commonly for remote users, reverse DNS lookup is used. That is, if you do a DNS lookup on, say, 192.168.100.7, a properly configured DNS system will return the preferred DNS name for the machine with that IP address.
An IDE is no substitute for an Intelligent Developer.
Tim's right, a reverse DNS may get you the DNS binding, but not always. For example, big sites often have something like a BigIP or ServIron that does load balancing. So there are lots of computers that DNS claims are www.google.com, but its unlikely that any computer really has that as its name.
Why do you want this? In most production environments, the DNS naming is completely independent of the box, the box's internal names, etc. And of course, NAT makes IP address of questionable value as well