01: package com.ice.jcvsweb.helper;
02:
03: import java.io.File;
04: import java.io.FileReader;
05: import java.io.IOException;
06:
07: /**
08: *
09: * @author Tim Endres,
10: * <a href="mailto:time@BlockIslandGroup.com">time@BlockIslandGroup.com</a>
11: *
12: */
13:
14: public class JavaHelper {
15:
16: public static String getShortClassname(Object o) {
17: String clsNm = o.getClass().getName();
18: int idx = clsNm.lastIndexOf(".");
19: if (idx > 0)
20: clsNm = clsNm.substring(idx + 1);
21: return clsNm;
22: }
23:
24: public static String getHashedName(Object o) {
25: return JavaHelper.getShortClassname(o) + "@" + o.hashCode();
26: }
27:
28: }
|