It happens to all of us!
The class can be found through the CMS_Tree table, so if you have the current document's NodeID, you can use the CMS.DocumentEngine's either TreeHelper or DocumentHelper (TreeHelper i think has a GetSingleNode where you can pass the NodeID).
Once you have the TreeNode object, you may be able to pull the ClassName from it, if not then grab the ClassID and use the ClassInfoProvider to get the class from the ID, and then the class name from that object.