View Javadoc

1   package com.atlassian.util.profiling;
2   
3   public class ProfilingUtils
4   {
5       /**
6        * Get just the name of the class (without the package name)
7        */
8       public static String getJustClassName(Class clazz)
9       {
10          return getJustClassName(clazz.getName());
11      }
12  
13      /**
14       * Get just the name of the class (without the package name)
15       */
16      public static String getJustClassName(String name)
17      {
18          if (name.indexOf(".") >= 0)
19              name = name.substring(name.lastIndexOf(".") + 1);
20  
21          return name;
22      }
23  }