Java Identity to String identityToString(Object obj)

Here you can find the source of identityToString(Object obj)

Description

identity To String

License

Apache License

Declaration

public static String identityToString(Object obj) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    public static String identityToString(Object obj) {
        return obj == null ? "" : obj.getClass().getName() + "@" + getIdentityHexString(obj);
    }/*from   ww w.  ja v  a 2 s  .  co  m*/

    public static String getIdentityHexString(Object obj) {
        return Integer.toHexString(System.identityHashCode(obj));
    }
}

Related

  1. identityToString(final Object o)
  2. identityToString(final Object obj)
  3. identityToString(Object obj)
  4. identityToString(Object obj)
  5. identityToString(Object pObject)
  6. identityToString(StringBuffer buffer, Object object)
  7. identityToSubject(String identity)