/******************************************************************************
 * Obtain the reference of an object  
 ******************************************************************************/
public class xReference
{
    public static String getRef(Object obj) 
    {
        int    ref  = System.identityHashCode(obj);             //get the reference as an integer
        String ref2 = String.format("%x", ref);                 //convert ref into a hexadecimal
        return(ref2);
    } 
}