Here you can find the source of createIdentifier(Class> clazz)
final public static String createIdentifier(Class<?> clazz)
//package com.java2s; import java.util.Map; import java.util.WeakHashMap; import java.util.concurrent.atomic.AtomicInteger; public class Main { /**/* w w w . j a va2s .c o m*/ * A mapping of classes to unique identifier counters. */ final protected static Map<Class<?>, AtomicInteger> counterMap = new WeakHashMap<Class<?>, AtomicInteger>(); /** * Creates a unique identifier for the given class. */ final public static String createIdentifier(Class<?> clazz) { synchronized (counterMap) { AtomicInteger counter = counterMap.get(clazz); if (counter == null) { counter = new AtomicInteger(0); counterMap.put(clazz, counter); } return String.format("%08x", counter.getAndIncrement()); } } }