Here you can find the source of hashClassName(Class clazz)
public static int hashClassName(Class clazz)
//package com.java2s; //License from project: Open Source License public class Main { public static int hashClassName(Class clazz) { String className = clazz.getName(); return hashString(className); }// w w w . java 2 s .co m public static int hashString(String str) { // See http://stackoverflow.com/questions/2624192/good-hash-function-for-strings int hash = 7; for (int i = 0; i < str.length(); i++) { hash = hash * 31 + str.charAt(i); } return hash; } }